Getting my message posted here might be not relevant from your point of view but I find this the best place to post.
I got a project for which we have to decide to follow a standard architecture except the Struts. We have decided to follow the architecture based on the casestudy given in the book Wrox Professional SCWCD. What we have decided is to have a servlet controller which will control all the requests and respond back to the client where we have distributed the business logic into Value Object(Simple JavaBean Classes) then an interface for Data Access Objects for every single module which is implemented in a seperate class. Besides, we have decided to create Business Delegate Objects which will be processing through all the Business Model Componants and which based on the results it will be retuning the page string back to the Controller servlet which will be showing the view.
Now my question is if it is the best practice in the industry or there can be any other better approach which could make my work reusable and no development part in the JSPs.
I am very much confused about this issue.
Kindly suggest me the best practice with examples, if possible.
As for the header. To me, best practices have similar meaning to patterns - they're solutions to known problems. The solutions are proven to work well and are intented to save your time that you would spend "reinventing the wheel".
Why you reject Struts? Using web frameworks is a very good example of following best practice! Struts provides MVC concept based framework that helps to develop production quality web applications. If your decision was driven by lack of examples or a fear that it's complex and hard to learn, I suggest searching for examples on the web, or reading a book on Struts. You can find Struts in nutshell in one of HFS chapters, I also found some parts of "Struts Kick Start" very useful.
Using Struts or any other web frameworks does not exclude using "Business Delegate -> Busines Component -> DAO" strategies.
posted 15 years ago
hmmmm.... I admit that Struts fits best to my problem but what could be the best way other than Struts?? Is it the pattern I described above?? Besides what are the disadvantages of that(my) pattern??
Thank you Vikas
posted 15 years ago
I have just bought a book by O'Reilly "Programming Jakarta Struts" and I am really finding Jakarta Struts a better approach than Simple MVC what a great help it has been!! I thank you very much. I want one more help if you can suggest me a simple Struts example which can CRUD with the database.
In my projects I also use something called Hibernate, if you don't know what it is... hmmm, looks like you gonna be amazed again. The problem is that I'm bit overworked now, so please give me two or three days (unless I go fishing for the weekend YESSSSS - if so it will take at most 4 ).