Smart Clients Vs Enterprise Applications

Topics: CAB & Smart Client Software Factory
Jan 19, 2006 at 10:29 AM
originally posted by: JulioCasal

Hi. I have seen what scenarios are covered with CAB and a SmartClient application. But I'm wondering how all this patterns fit into an Enterprise Application, where you use webservices and a database in the backend. I mean, it seems like smart client patterns are not really dealing with the fact that there should be a backend of web services that provides all the business rules and services that the client needs.

So I'm confused. If I make a Online transaction processing (OLTP) smart client application, is it bad if I use full web services in my back end? Should I connect directly to my DB? Are smart clients and enterprise applications two different concepts?

Thanks!
Jan 20, 2006 at 4:46 PM
originally posted by: rxd9507

Same question!!!
My thoughts:
Cab plays a role on the client side. On server side have your Model (objects, services etc) and DAL layer.
Expose system through Web Services. //One way, remoting etc...
Have Cab services call web services.

CAB is great but not a panacea. It solves a tiny subset.
BankTeller is a simple example that is meant for introduction.
BUt sevices directory in Modules could easily call web services and either get DataSet or objects.

BusinessEntities in my opion belong at server side. I am totally against binding BusinessEntities to control dorectly as MODEL should reside on server. But serialize the object and then bind the control via BindingSOurce might be feasible....

I am throwing some ideas.....I need to figure out binding and Object/relational mapping throgh NHibernate or something.
Microsoft does not have anything like NHibernatem, which is really important if you believe in POJO, PONO....

RxD
Jan 20, 2006 at 5:32 PM
originally posted by: JulioCasal

Well yes, I was also wondering if the services that CAB examples show could be mapped to web services. Then I saw the Smart Client Baseline Architecture ToolKit Reference Implementation and then I got confused again. That's because the services like the ones in the examples just have disappeared, and they put another group of classes they call Service Agents, which I think are a good intermediate between the UI and web services. But what about CAB services? I also saw there the Business Entities duplication on server and client side, and I also think that it is a really strange and bad pattern.

I would just like to understand how this all things fit togheter. How should I be building my smart client app with the full backend of an enterprise application?
Jan 20, 2006 at 7:04 PM
originally posted by: rxd9507

Service is a layer that says I will get stuff for you. Cab service or Web service or whatever....
A service can call other service to get the stuff done. So it still makes sense to have CAB services or agent as in bankTeller but they can call web services and get the information and give it to controller or whoever...

Business Entities definitely belong at server but it is debatable whether another entity should belong at client ir not. You might do some caching sort of stuff on client to avoid going to web service (if that is your entry point) to your Model....

Client side:
Work Item :SP, Controller, Services, Business entity (might or might not)

Server side:
Web services (depends, I would say yes)>MODEL>NHibernate or whatever>DataBase
where MODEL contains core business entities, facade, helper or whatever you need to expose.

CAB Service just know about Web service layer(which should be minimal and passthrough) and real work should be done in MODEL.


Today> CAB(client)>Web Service client stubs(wsdl.exe/VS abstraction via web ref)>Web Service(server, pass thru thin layer)>>Your model & data(server)
Tomorrow>WEB(client)>Web Service client stubs(wsdl.exe/VS abstraction via web ref)>Web Service(server)>>Your Same model & data(server)

This architecture is obviously not a good fit for strong database and minimum business layer type application, in which case I would say use DataSet heavily and let the database floating without worrying about model too much......Afterall DataSet is a damn powerful concept...

DO not expose raw database as such...Tomorrow model could be feed by something else(highly unlikely)...

I am still debating myself the best way to go with CAB.
Regards,
RxD