Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Design

 
Amer Seifeddine
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am wondering which design would be better than the second for a business appliation managing user sessions (active/inactive etc):

1- Leave incoming threads to interact with sessions/database
2- Have internal threads managing incoming threads and serve their requests? How would I do that?
3- Any other idea is welcome.

Thanks!
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
3a. Use a framework that handles sessions and threading for you. Learn how to use it. Then worry about your business issues, and less on threading and sessions.
 
Amer Seifeddine
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to build my own framework along with the business application.
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Amer Seifeddine:
I am trying to build my own framework along with the business application.


The great thing about open source projects is that the source is available to actually look at. Pick a couple of existing frameworks you like, and look at their source code to see how they handle it. What do you feel you need to do differently?

You can learn a lot by reading source code. One of my favorite tech bloggers, Scott Hanselman, does a weekly source code post where he talks about what he learns from reading the source of different types of applications. Great stuff for developing your own skills.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Amer Seifeddine:
I am trying to build my own framework along with the business application.


As a mental game, thats cool. But life is too short to re-write code that someone else has designed, written, tested, and documented.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic