• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tell me the truth please.

 
Jianping Wang
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you guys design all the class diagrams and sequence diagrams before coding? or just like me, get a general idea of class and then coding quickly?
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hehehe I like the title of your topic!

Well champion, honestly, I just started coding without creating any diagram first. I see that sometimes it is a "must" (due to the policy of the company you work for, for instance)... or you may want to come up with a class/sequence diagram before coding in order to guide your development. Although most of the time it is a good idea to have a class diagram (to document your design and help future maintenances), it isn't really necessary to create one for the assignment. I myself didn't create any diagram, but if you feel more comfortable creating a diagram before coding, feel free!
 
Roel De Nijs
Sheriff
Posts: 10203
129
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No diagrams for me, just a whole lot of thinking and discussing, resulting in the design I wanted to implement. And then: just do it
 
Jianping Wang
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently I am running into a trouble for my company projects: I have 12 Dao, and every Dao has an interface, so 24 classes/interface. That's just persistence layer. In my present layer, Struts, I have to create 12 Forms and 12 domain classes. And what's more there is one class has 32 variables, all have to be validated and converted!!
So that's why I want a clear plan before coding. I read this article http://www.ibm.com/developerworks/java/library/j-genericdao.html to reduce number of classes. And still looking some other design solutions for my situation. And begin draw UML because of the trouble I just mentioned.
 
Roel De Nijs
Sheriff
Posts: 10203
129
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jianping Wang wrote:Recently I am running into a trouble for my company projects: I have 12 Dao, and every Dao has an interface, so 24 classes/interface. That's just persistence layer. In my present layer, Struts, I have to create 12 Forms and 12 domain classes. And what's more there is one class has 32 variables, all have to be validated and converted!!

The SCJD assignment certainly will not be that huge: 1 dao will result in 2 files (1 class and 1 interface). And your model class (if you create one) will have 6-7 properties. If you just work with the String[] you won't have a model class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic