Re: better way of using XML

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Sharon,

I think you need to separate in your mind the GUI and the data that it
represents. The only data going to the Web Service should be business data.
The GUI can manage itself, and the Web Service doesn't have to know anything
about the GUI, only the data that it represents. Remember that the "U" in
GUI is "User," meaning that the GUI is for a human user, not for a business
class.

The GUI is supposedly getting its data from some sort of business layer of
business objects that actually do the work with the data, or it should be.
This type of layered design makes it easier to port from one sort of
interface to another (such as a Windows form to an ASP.Net app or a Console
App, for example). The GUI's job is to present data to a User, and to
receive input from the User.

As for the Web Service, it should be a set of SOAP Web Methods that are,
essentially, business methods. That is, these methods operate only on data,
receiving it, retrieving it, and manipulating it. It is possible, for
example, to create an application whose business classes are entirely Web
Services. The GUI simply talks to the Web Service by calling Web Methods, as
if it were talking to a local set of business objects and making method
calls to them.

This separation enables each logical "layer" to manage the business that is
its own, without any other layer having to know anything about that layer's
"personal" business. Or, as my Uncle Chutney sez, "a class should mind its
own business."

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.

"Sharon" <Sharon669@xxxxxxxxxxx> wrote in message
news:uODJlAe%23FHA.2664@xxxxxxxxxxxxxxxxxxxxxxx
> hi all
>
> I have a small application assembled from
>
> C# winForm client side (few of them)
>
> C# webService at the server side
>
>
>
> I'm using xml file to transfer the GUI information from client to server
>
> For Example in the client window there are 3 text box's and one button
>
> Text boxes are "first num" , " second num" and "sum"
>
> And "calc" button
>
>
>
> So when the user click the "calc" button , the winForm window send the GUI
> xml to the server , and the server parses the xml file and fill in the
> records
>
> Xml example :
>
> <Gui_items>
>
> <item>
>
> <textbox name="first
> num">30</textbox>
>
> </item>
>
> <item>
>
> <textbox name="second
> num">50</textbox>
>
> </item>
>
> <item>
>
> <textbox
> name="sum"></textbox>
>
> </item>
>
> </Gui_items>
>
>
>
> the server response will be :
>
>
>
> <Gui_items>
>
> <item>
>
> <textbox name="first
> num">30</textbox>
>
> </item>
>
> <item>
>
> <textbox name="second
> num">50</textbox>
>
> </item>
>
> <item>
>
> <textbox
> name="sum">80</textbox>
>
> </item>
>
> </Gui_items>
>
>
>
> Then the winForm client get the response XML and parses it ,
>
> All GUI item's are filed in to the GUI controls
>
>
>
> This only simple example, the real client window is much complex,
>
> I'm using labels and label's color changing
>
>
>
> Currently I'm parsing the XML file using System.Xml
>
> Is there any way I can bind the GUI elements to this XML and make it
> easier
> for me to develop it ?
>
> Is there any way I can use dataset's and have the same goal ?
>
>
>
> Please post any comment you have
>
>
>
> Thank you very much
>
> Sharon
>
>
>
>
>
>
>
>


.



Relevant Pages

  • Re: which to choose, evc or .net compact framework?
    ... 'A gui, web service or something with XML should be made with CF; ... both have their advantages and disadvantages. ...
    (microsoft.public.windowsce.embedded)
  • Re: Webservice
    ... You use GUI in ASP.NET all the time so why can't you use it ... A web service is a type of UI, ... Gregory A. Beamer (MVP) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Does it exist WebService that has a GUI
    ... If a Webservice has a GUI how will that be presented in Browser because ... client side to be a GUI for the web service - it it more appropriate ... app both be a web app and expose web services. ...
    (microsoft.public.dotnet.languages.csharp)
  • Web Service returning types - BIG PROBLEMS
    ... My GUI and Web services were finished, ... the GUI to the Web service and started testing them. ... The class Tender looks like this: ... returning value of the Web Service method GetTenders. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Business Entity Designs
    ... > Tier Roles and Responsibilities (6 assemblies in total) ... > Client user interaction via GUI ... > All business and application logic serviced by .NET remote \ COM+ ... > I've tried to look at existing systems & examples (hence my Duwamish ...
    (microsoft.public.dotnet.distributed_apps)