• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What are the Best Practices??

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

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.

Thank you
Vikas
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.

Regards
Krzysiek
 
Vikas
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Vikas
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Krzysiek,

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.

Thank you very very much once again.

Regards
Vikas
[ January 26, 2005: Message edited by: Vikas Sharda ]
 
Krzysiek Hycnar
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vikas,

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 ).

Cheers
Krzysiek
[ January 26, 2005: Message edited by: Krzysiek Hycnar ]
 
Straws are for suckers. Now suck on this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic