CSLA based Web Site Architecture -Urgent Please

CSLA based Web Site Architecture -Urgent Please

Old forum URL: forums.lhotka.net/forums/t/4078.aspx


Dodi posted on Friday, December 21, 2007

Hi ,

I started last week to get involved with CSLA.Net which is by all means so great. Rockford did just so great.

But I am a little confused about how I may utilize the frame work in Web application. It looks greater for Windows apps.

here is my scenario:

I have DB server and Web server running IIS , through all my web app I ever developed all I used to do was publish my Asp.Net web site into web server and user free to connect to my web server and use my web site.

So my confusion here came from the Idea of data portal. In my web apps I don’t need enterprise services or remoting or web services to run my data access code , I all I need  is the web server(IIS) to take care of everything.

I think there is local proxy class , so my question is : based on my scenario above do I need use the local proxy class by removing CslaDataPortalProxy from my web.config so the framework will use the local proxy and/or shall I decorate my DataAccess functions with RunLocal attribute?

Thank you ,

Dodi

 

Michael Hildner replied on Friday, December 21, 2007

Yeah, just remove/comment out the CslaDataPortalProxy stuff from the .config and it will use the LocalProxy.

JoeFallon1 replied on Friday, December 21, 2007

I agree with Michael.

You should write code as if you were planning to use the remote DataPortal though. In other words, follow standard accepted coding practices. e.g. Only communicate with the DB from DataPortal_xyz methods or BOs. Never write SQL commands anywhere else in the BO. That way if you ever do need remoting the app will still work when you add back the config file stuff.

I have a web app which runs on Intranets for large companies. But there is a smaller app which runs on the Internet in their DMZ. This is so outside vendors can use parts of the app. For IT security reasons this app runs on the Web Server in the DMZ and is not allowed to directly communicate with the Database which is on the other side of the firewall. So this requires remoting of the objects from Web Server 1 through the firewall to Web Server 2 (the app server). The app server is allowed to talk to the DB so things are fine from that point forward.

Joe

Dodi replied on Friday, December 21, 2007

Do you have any performance issue so far? , I am just worried a lilltle bit of reflection usage inside the frame work.

 

tmg4340 replied on Saturday, December 22, 2007

Not that you're going to notice.  Most of the heavy reflection use is in the undo capabilities, which you likely won't be using in your website (because no one usually does undo in websites.)  The reflection in the DataPortal is pretty much completely overshadowed by the basic communication overhead with the database, even if everything is local.

Rocky has touched on this in the forums before, but reflection is not necessarily something to be afraid of.  Yes, it's slower than other coding options.  But it's used in a lot more places than you might expect.  Data-binding relies on it heavily, for example.  And, just in general, don't worry about performance issues until you have the website up and running and can do some profiling to see where the bottlenecks are, if there are any.  You might be surprised.  I've often found that unless I have some bad coding practices in use, performance problems are almost never where I think they are going to be.  And what I might consider a "performance problem" may not be to the users.

HTH

Dodi replied on Saturday, December 22, 2007

Thank You All.

 

Copyright (c) Marimer LLC