Architecture question
I have an application I'm building in .NET which is designed to run on a web server. To start out with, all the functionality of the application will be avaliable using a web browser and ASP.NET, but I also have plans for making a GUI client avaliable later (in C# using Windows.Forms).
What I want to do is create a minimalist way of making all the functionality of the server avaliable to both clients. I'm thinking of creating a sort of SDK interface to all the functionality avaliable on the server, then creating the ASP.NET pages and Winforms application to use that SDK interface as much as possible. The ASP.NET and Windows code will handle all the presentation, and just get data from the same common component.
A bonus of this model is it will allow other developers to create their own GUI clients to access the servers functionality if the SDK were made publically avaliable, while still keeping the internal code secret, which would suit my business model nicely.
Does this sound like a strong architecture for my application? Would you go about it differently? I'm not at liberty to say what the project does, but I can say that a lot of the GUI is aimed at editing documents, while the server is designed for managing them. But I would also like the GUI to provide management aspects too.
Any comments would be most appreciated!
Wants to be an ISV
Tuesday, April 13, 2004
Depending on how much data is being passed around (and if you aim to have it viewable over ASP.Net, I'd warrant that timeliness isn't an issue) I'd say that webservices sound perfect here. Expose your key methods as web services that are hosted by the webserver. Then you can have your ASP.Net apps programmed against them, as well as your WinForms clients. A single API with any number of interfaces.
The other alternative I see is to expose your base layer of API in a system library, and then wrap that library as another lib adding in any "business logic" then you can program against this layer with minimal code behind.
I personally like the first approach better, as it seems much cleaner to me. Maybe not the world's most efficient means for WinForms, but seeing as that isn't your priority, I think it would work fine.
Elephant
Tuesday, April 13, 2004
I must admit, Web Services isn't something I've looked at much. I have a chapter or two on it in my book, so I'll have a ponder over it tonight. Thanks for the advice!
One thing I dislike though is the use of the designer for my code (except the C# Winforms GUI). I write everything using a standard text editor, and compile it all with my own custom batch files, and just use the VS.NET IDE for debugging and GUI's. My ASP.NET applications are no exception. Are web services something I can create in the same way?
Wants to be an ISV
Tuesday, April 13, 2004
You need to investigate the performance of Web Services, before going down that road. Also, they only work if what you're passing back and forth is serializable (which is not everything). Remoting may offer better performance.
It sounds more like you should be creating a class library which can be shared by the ASP.NET front end or the WinForms application.
Steve Jones (UK)
Tuesday, April 13, 2004
I believe so, although, I think it requires a bit more work on your part. i.e. since webservices are essentially linked during run time, you need to have stub methods in place for compilation. I believe that the IDE does this for you when you add a web reference, but I must admit that I am ignorant as to what really happens. All I know is that it works. I have seen some books and websites that mention this process, and describe how to do it w/ the command line compiler. Unfortunately, I can't remember any titles or links off hand. If you want I can poke around when I get home and see what I find, or maybe someone else could suggest something.
Elephant
Tuesday, April 13, 2004
"I write everything using a standard text editor, and compile it all with my own custom batch files, and just use the VS.NET IDE for debugging and GUI's."
BRAVO! CHEERS AND ADULATION!
.
Tuesday, April 13, 2004
>> BRAVO! CHEERS AND ADULATION!
I think you misunderstand - I said it because I would have preferred not to use the technology if it required a lot of IDE-generated code. I'm not saying I think it's bad that other developers use the IDE more often, or that I'm better because I roll my own.
On the contrary, I suspect I'm probably a lot worse off for not using the IDE more often, because I'm probably missing out on a lot of the functionality VS.NET provides. It's just my personal preference.
No need to get cranky.
Wants to be an ISV
Tuesday, April 13, 2004
If you're interested in WebServices, this may be handy:
http://www.webserviceresource.com/
Dave Hallett
Tuesday, April 13, 2004
Recent Topics
Fog Creek Home
|