Sorry, I already posted a topic to this effect, which I deleted. This is the exact, more or less, project stats:
Total lines of code: 4391. Total programming lines of code: approx. 2000 Commends: approx. 2391
Classes: 19 to 21, I am still considering merging some classes (originally had a verifier class that I am probably going to merge.)
Functionality is hidden behind interfaces.
Values are hard-coded into classes, some find themselves in a DataUtilities class, which holds some of centralized functionality.
Please comment if maybe you think I am underdoing it. The system works quite well, although I am still to implement a data model from AbstractTableModel.
Patterns used: Adapter to ease the Data class into business logic. MVC for the GUI.
Thanks. [ September 21, 2004: Message edited by: Anton Golovin ]
Anton Golovin<br /><i>anton.golovin@gmail.com</i><br />SCJP, SCJD, SCBCD, SCWCD
Robert Chisholm
Ranch Hand
Joined: Jul 18, 2004
Posts: 69
posted
0
For what it's worth I totalled what I've recently ripped up in the last 3 weekends as a "release candidate":
18 classes/interfaces total, 2223 lines of code.
That's with 1/3 the comments required (yes, Bad Me).
I used a couple custom exceptions and the following patterns: Service Locator, DAO (esentially Adapter), DTO, and MVC.
Regards,
SCJP 1.4<br />(WIP) SCJD B&S v2.3.3
mike acre
Ranch Hand
Joined: Sep 23, 2003
Posts: 197
posted
0
I can not believe you've used those patterns and managed to weigh in with just ~20 classes. I've used similar patterns and got 50 top level classes/interfaces.
SCJP 1.4, SCJD
Joakim Eriksson
Greenhorn
Joined: Sep 13, 2004
Posts: 25
posted
0
Originally posted by Robert Chisholm: For what it's worth I totalled what I've recently ripped up in the last 3 weekends as a "release candidate":
18 classes/interfaces total, 2223 lines of code.
That's with 1/3 the comments required (yes, Bad Me).
I used a couple custom exceptions and the following patterns: Service Locator, DAO (esentially Adapter), DTO, and MVC.
Regards,
Very impressive (lean code) metrics. My project metrics is around 5500 lines of code, and about 30 top-classes, and that is w.o. Javadocs (but with inline comments). I'm currently trying to refactor the app to a smaller footprint. Especially my gui code is very verbose (50% of the app). I have six packages: db, net, gui, gui.controller, domain and util
/J
Mike Vess
Ranch Hand
Joined: Aug 25, 2004
Posts: 41
posted
0
Whow!! A whole lot of code! This is my statistics and ALL coding is done:
Have i missed something? Why is your program code 2000+ lines?
What you thought was right today may need a refactoring tomorrow...
mike acre
Ranch Hand
Joined: Sep 23, 2003
Posts: 197
posted
0
I'm astounded! ~1000 lines of code!
Mine was 3200 NCLC over 50 classes.
I suppose if you haven't used transfer objects with a very minimal GUI, no caching, perhaps just Data & interface - it is about possible. I know I've been purporting a minimalist design, but that doesn't mean I took my own advice! And that is probably why I'm still waiting for the result. [ September 21, 2004: Message edited by: mike acre ]
Hanna Habashy
Ranch Hand
Joined: Aug 20, 2003
Posts: 532
posted
0
hi all: IMHO, software should not be measured with the size and the number of lines of code -of course unless it is abslutely required. One can do the whole project under one thousand line of code and in one or more classes, however it doesn't mean it is a good written code. A software should be measured of how easy it is to be mentained and extended. What I am trying to say is more code that easy to mentain and extend is much better than a compact code that no one can understand.
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
Mike Vess
Ranch Hand
Joined: Aug 25, 2004
Posts: 41
posted
0
I suppose if you haven't used transfer objects with a very minimal GUI, no caching, perhaps just Data & interface - it is about possible.
Minimal gui? I dont know. I have four dialogs, create booking, update booking, book room and database setup. I think that i have done a lot more GUI code than necessary.
I am using RMI for communication and that reduces the amount of code compared to if i had used serialization instead.
mike acre
Ranch Hand
Joined: Sep 23, 2003
Posts: 197
posted
0
Originally posted by Hanna Habashy: IMHO, software should not be measured with the size and the number of lines of code
I think that goes without saying. I am taking it as read that all the designs are basically good, which of course they may not be. Without writing huge replies explaining designs, of course this is a fairly pointless exercise.
Robert Chisholm
Ranch Hand
Joined: Jul 18, 2004
Posts: 69
posted
0
I wasn't trying to keep the classes/codebase small really. I treated it like "another project at work". So it just turned out that way.
Also, the B&S project sounds easier than some of the other projects I've heard about.