C# - Pros And Cons Of Using JSON For WCF Service

May 1, 2010

What are the pros and cons of the following 2 cases: Case I: Traditional way: Add service reference in project. Create object and Get data from service on server side and bind to asp.net grid. Case II: Update Service for JSON behavior. Add service reference in project. Call service from javascript to get data. Bind data to jquery grid. Which one is the best approach and why?(Not developer point of view)

View 2 Replies


Similar Messages:

C# - Web Service VS Aspx Pages - Pros And Cons

Jan 14, 2011

We develop an ASP.Net web application that is hosted on an internal network. Currently, we have some ASPX pages that handle web requests from the client side and interact with our servers. We are starting development on our next major application version, and we are deciding on the architecture. What are the differences between using ASPX pages to handle http requests as compared to using a full blown Web Service (which would most likely be a WCF Service)? In researching this issue, I have come across a few related posts that have been moderately helpful, seen here and here. My understanding of some of the key differences are as follows:

ASPX pages are limited in the kinds of requests they can receive. They are strictly HTTP whereas a WCF service can have multiple endpoints to service a variety of protocols (HTTP, TCP, etc). WCF Services are more concretely defined due to ServiceContracts. This means that if a project makes a reference to the service, they know exactly what to expect in terms of methods, usage and documentation. An ASPX page is more of a free for all in terms of methods contained and requests accepted. However, based on these concepts, my issues are as follows:

The ability to support different protocols is a great feature in terms of future proofing and compatibility, but what real benefit are we seeing if we are currently only using it to interact via HTTP? In line with my previous argument, if we are only interacting with the service over a web, do any of those points really make any difference? An http request doesn't care about any of those finer details or contractual guarantees so long as the method it calls "just works".

Is there anything I am missing? Any key benefit to using a service? Personally, I support the Web Service architecture. I like the idea of having a flexible and well defined system that can support future development. What I am basically looking to get out of this is a way to go to a coworker and say "This should be a service for x y z reasons and we could see a b c improvements for doing so".

View 5 Replies

Pros And Cons Of Running Quartz.NET Embedded Or As A Windows Service?

May 20, 2010

I want to add quartz scheduling to an ASP.NET application.It will be used to send queued up emails.What are the pros and cons of running quartz.net as windows service vs embedded.My main concern is how Quartz.NET in embedded mode handles variable number of worker processes in IIS.

View 2 Replies

C# - What's The Pros And Cons Using Membership

Nov 23, 2010

I'm building a new website and How to use the asp.net membership for the authentication process (login, registration, password recovery, etc..). I saw that everything is stored in an XML file. I would like to know what are the pros and cons using the membership instead of to build something from scratch.

View 6 Replies

Pros And Cons Of Using This Keyword In C#

Mar 5, 2011

Possible Duplicate: When do you use the “this” keyword? In programming you can use the this keyword this.Textbox or just Textbox What is the best practice? Some benefits I can see is that using this makes it easier to see in intellisense and makes it easier to understand that it is a property. Currently I don't use this... I read in some article somewhere that the guy removed all the references, but I don't remember why.

View 4 Replies

MVC :: Pros And Cons Of MVC Framework

Nov 19, 2010

I am a solutions developer in India. I have been working on traditional ASP.net for some time and have been hearing alot about MVC framework. So, i am writing this Post just to have some reviews from you all that what are the major pros and cons of MVC framework. And in which areas/ cases it is suited the most, i mean business websites or commercial websites or Casual Websites. Just to add i am into developing MES portals for Manufacturing companies. So, would want to know is MVC suitable for the same.

View 11 Replies

C# - Javascript Do Postback And Its Pros And Cons

Sep 29, 2010

the information of do postback details.

View 2 Replies

Pros And Cons Of The Login Controls?

Aug 12, 2010

ASP.NET provides a basic set of Login Controls that integrate with the ASP.NET Membership and Forms Authentication providers. I wouldn't mind being able to skip re-inventing the wheel on this kind of functionality, but I'm wary that there may be security, performance or usability reasons to consider rolling my own.

View 2 Replies

Architecture :: Repository Pattern - Pros And Cons?

Jul 8, 2010

This is possibly the worst kind of religious debate -- a religious debate with practical consequences. But it's one that needs to be had, and I can't seem to fit it in my tiny head. Here are the pros and cons of the pattern as I know them:

Pros:

-Encourages DRY (don't repeat yourself) design in that identical queries are written only once per set of query conditions
-Facilitates unit testing by allowing itself to be abstracted into an interface
-Creates an opportunity for business-level validation

Cons:

-Breaks DRY philosophy in that you're generally repeating your database schema
-In a sense breaks separation of concerns, because the query concerns of the controller and view frequently become the concerns of whoever is maintaining the repository
-Determining what should be a repository and what should be returned as a raw associated ORM entity becomes an ambiguous art

To me it seems like all this stuff should be done at the ORM level, but Entity Framework has much fewer hooks than Linq to Sql does, yet Entity Framework tends to be regarded as being more robust, so it seems that this is by design, and that the designers of EF are in fact encouraging another layer. Are there any tools or anything that I could be using for this? Am I missing something?

View 6 Replies

Whats The Pros/cons With Working With PHP As Opposed To .net Or The Whole .net Framework

Mar 5, 2011

im currently working with php but everyone is telling me that asp.net is so much better and i was just wondering what the real story is

View 2 Replies

Configuration :: Pros / Cons Of Using Static Ip For Website Authentication

Dec 16, 2010

I am building a web application that will not only require a standard user/pass authentication, but users will need to reside at certain locations to authenticate. My initial thought is to have those locations set up with static ips, that I can look for in the request for authentication. I am mostly a programmer and not an expert in http and iis. I am hoping to get some good advice as to what the pros and cons to this approach will be. Also, VPN to the web server is not an option. This web application will be exposed to the web.

View 2 Replies

ADO.NET :: SQL Server Views And The Entity Framework - Pros Vs Cons?

Mar 16, 2011

I was wondering what your thoughts were in regards to utilizing SQL Server Views as objects in the entity framework? It would only be used for reading data versus modifiying it.

View 2 Replies

Security :: Implement Kerberos Authentication - Pros & Cons?

May 7, 2010

how to implement kerberos authentication in asp.net. Pros & Cons of this authentication process.

View 1 Replies

Architecture :: Finding Pros And Cons Of Static Classes And Variables (particularly A Db Connection)

Jan 11, 2010

So I started working on my first asp.net application that involves logging in and databases, and soon after i started messing around with a static class. I "discovered" that if you make a variable static, all sessions share that variable (I for some reason was originally assuming that each session had its own copy of that "static" class). Anyway, after discovering this I thought to myself "how could this possibly be useful to me" and thought that itmight be a good idea to make a single static database connection for all of the sessions, rather than storing that as a session variable for each session. Does anybody know what would be the pros and cons of this approach?

View 5 Replies

C# - What Are The Pros/cons Of Choosing Between Static And Instance Data Access Classes In A Web App

Jan 20, 2010

I've read several other questions on this topic (here, here, and here), but have yet to see a great answer. I've developed my fair share of data access layers before and personally prefer to use instance classes instead of static classes. However, it is more of a personal preference (I like to test my business objects, and this approach makes mocking out the DAL easier). I have used static classes to access the database before, but I've always felt a little insecure in the appropriateness of such a design (especially in an ASP.NET environment).

Can anyone provide some good pros/cons with regards to these two approaches to developing data access classes with ADO.NET providers (no ORM), in an ASP.NET application in particular. Feel free to chime in if you have some more general static vs. instance class tips as well.

In particular, the issues I'm concerned about are:

Threading & concurrency
Scalability
Performance
Any other unknowns

View 4 Replies

Pros And Cons Between Using The Control Compared To Old Reliable Table Html Implementation?

May 7, 2010

What are the pros and cons between using the ASP.Net control compared to the old reliable table html implementation. I know that the asp:Table will end up on the returned page as a html table, and from looking into it so far people are saying its easier to work with the asp:Table in the server side code, but I'd love to hear what the stackoverflow community has to say about the matter.

View 3 Replies

Pros/cons Of Reading Connection String From Physical File Versus Application Object

Apr 9, 2010

my ASP.NET application reads an xml file to determine which environment it's currently in (e.g. local, development, production).

It checks this file every single time it opens a connection to the database, in order to know which connection string to grab from the Application Settings.

I'm entering a phase of development where efficiency is becoming a concern. I don't think it's a good idea to have to read a file on a physical disk ever single time I wish to access the database (very often).

I was considering storing the connection string in Application["ConnectionString"].

[code].....

I didn't design the application so I figure there must have been a reason for reading the xml file every time (to change settings while the application runs?) I have very little concept of the inner workings here. What are the pros and cons?

View 2 Replies

Architecture :: Check In "project Dll" - Pros And Cons?

Jun 23, 2010

I've debated a bit with a colleague of mine whether or not to check in the "project dll". I haven't found any resources/information on this at all.For example: I have a project Foo with a reference to some external class library which isn't supported by me (maybe some open source or such).

Naturally, the external class library dll is commited to the versioning system. Although the Foo.dll (which I compile everytime) does not, according to me, belong in the versioning system. This because it can currupt releases since it does not force the user to compile after check out. Other than that, I haven't found any good arguments other than this. But I've never seen anyone checking in the "project dll".According to my colleague, the "project dll" is commited every time a change has required compilation (naturally, when the dll is changed, it's commited).

View 2 Replies

How To Consume JSON From A Web Service

Oct 7, 2010

We have a web application providing a service using a simple REST interface (GET/POST methods) and returning results in JSON format.

A client wants to use the service from an ASP application (I assume ASP.NET) and asks for example code.

Is there any standard/widely-acceptable procedure for consuming JSON based web services from an ASP.NET application? I'm not familiar with the .NET framework, but can work my way through C#.

View 2 Replies

MVC :: Getting Exception With JSON Web Service With 2.0.0.0?

Feb 8, 2010

I am getting an exception with the JSON Web Service with MVC 2.0.0.0.

Earlier it worked.

The code:

[Code]....

The exception:

[Code]....

View 10 Replies

AJAX :: Unable To Use Wcf Service With Json

Feb 13, 2010

I have developed a wcf service for asp.net ajax client. It includes the following steps.

(1) Created WCF sevice contract with the operation "DoWork()" which will take string as input and retun string as output.

(2)Implemented the above operation contract(attributed the implementation class with aspnetcompatibility requirement as enabled).

(3)Added the webscriptenabled to endpoint in web.config file.

(4)Hosted the wcf servie.

(5)Downloaded the javascript file from the service.(e.g.,http://localhost/service1.svc/js)

Client

(1)Opend new asp.net webapplication.

(2)Added the downloaded .js file.

(3)Given the scripts path for ajaxscript manager as both .js file and service url.

e.g

<asp:ScriptManager
ID="id1"
runat="server">
<Scripts>
<asp:ScriptReference
Path="http://localhost:3443/Service1.svc/js/"
/>
<asp:ScriptReference
Path="~/js1.js"
/>
</Scripts>
</asp:ScriptManager>

(4)With this I am unable to call service method

View 2 Replies

JQuery :: Calling Web Service Using JSON?

Jan 6, 2011

I just want that when i enter name in Textbox1 it shown in TextBox2 when i click on Button

I am using HTML page here's the code

<input id="txtID" type="text" /><br />
<input id="txtName" type="text" /><br />
<input id="btnShow" type="button" value="Show" />

[Code]....

But when i load this Web Page its show this error after click on button

Error: 12031 unknown
Error: 500 Internet Server Explorer

View 18 Replies

Javascript - How To Make Json Child Nodes (JSON Inside JSON)

Aug 11, 2010

I try to use the jquery + json to get all elements in form and build a JSON var to post in a ASP.NET MVC method.

[Code]....

It method get all fields in a form and build a JSON, but it dont put JSON inside JSON.

Example:

If i have the follow form:

<input name="person.name"><input name="person.age"><input name="person.address.street">

The serialized string build a JSON like this

{ "person.name": "??", "person.age": "??", "person.address.street": "??" }

I need a plugin or some function to generate like this:

{ "person": { "name" : "??", "age" : "??", "address":{ "street": "??" } } }

View 1 Replies

WCF / ASMX :: Read Data From Json Web Service?

Dec 16, 2010

I'd like to read data server-side from a web service that outputs in json format. I haven't found any good examples that don't use jquery and are server-side.

Specifically I'm looking at the "weight" field from this api:

[URL]

PS: this is a spin off of another post at: [URL]

View 6 Replies

WCF / ASMX :: Return JSON Data From A 2.0 Web Service?

Sep 10, 2010

Just ramping up on JSON and JQuery and returning data to a ASP.NET web page from a web service using Ajax. The JQuery part is pretty straight-forward. However, when trying to return JSON formatted data instead of XML from a 2.0 web service, I'm stuck. The web service does have the System.Web.Script.Services.ScriptService attribute, so I can hit it via JavaScript; however, the web service always...always...returns data in XML format, no matter if I explicitly say I want JSON as the datatype in my JQuery code. So I don't know if this is an issue with the web service or the JQuery code. I posted this here, but realize that the category could be incorrect depending on where the issue is. Is there no way to return JSON data from a 2.0 web service? It's a production web service, so I can't change the code unfortunately.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved