Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 4711 times and has 1 reply Next Thread
alied
Member
Member's Avatar

Argentina
Joined: Sep 8, 2009
Post Count: 40
Status: Offline
Reply to this Post  Reply with Quote 
SH3D design. Do it less coupled

Hi Emmanuel, I've bee using SH3D for a while and became kinda familiar with its code.

I have a sugestion for next releases:
Split the functionality and decouple each others.
What I mean, many non-core functions could be implemented as plugins, and delivered with the installer (which can even be optional)
For instance, the ModelManager loadModel, might use Service lookups to locate the available loaders (those that implement Loader)in the system.
I bring this because I'm working in a NetBeans RCP version of SH3D, And have done some changes toward this.
You can check this at https://sourceforge.net/projects/sh3d-nb/ Still some refinement is needed (e.g. at loading an NPE must be fixed. I did it here, but still need to submit the changes)
Please, if you have the time, check it out and tell me your opinion.
As I said, it's a NetBeans RCP app, but it shold not be quite difficult to compile it outside, provided the needed libraries.
[May 20, 2010, 9:37:45 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: SH3D design. Do it less coupled

Alied, I don't really understand your point:
- Additional Java 3D loaders can be specified by the System property com.eteks.sweethome3d.j3d.additionalLoaderClasses used in ModelManager class. A Service lookup is probably better but I felt that setting a System property + changing classpath would be simpler!
- Anyone can develop and install plug-ins with additional features accessible from the user interface. The plug-in system isn't probably perfect because there's no user interface in the program to manage installed plug-ins and it doesn't give access to program's controllers and views. But as so few developers showed some public interest to it until now, I prefer to add features required by users.
- Furniture catalog, textures catalog and user interface languages list can be customized and extended with SH3F, SH3T and SH3L files.
- If you need a light version, program can be launched without iText, FreeHep, SunFlow and JMF libraries (like in the Online version shown to unregistered users); simply disable the actions that give access to the features requiring these libraries, in a derived version of the program.
- I try to keep program not too complicated with a clean MVC architecture, ensure backwards compatibility, and use Java packages as modules with clear dependencies checked by PackageDependenciesTest. Within a package, some classes are even completely or mostly independent from other classes like the DAE/Collada Loader I developed recently.

Until now, all this seems to work better and better, since the last derived version I programmed didn't require me to change Sweet Home 3D API, even if that program required new types in its model and a different user interface.
But I guess you know all that, since you're familiar with the code. So what additional changes should I make without breaking compatibility?


About your NetBeans RCP version, I succeeded to check it out, and load it in NetBeans 6.8, but it refuses to run from NetBeans. It says:

/Applications/Developer/NetBeans/NetBeans 6.8.app/Contents/Resources/NetBeans/harness/suite.xml:121: Cannot open /[path-to]/sh3d-nb/SH3D_NB/sweethome3d-plugin/nbproject/project.xml
BUILD FAILED (total time: 0 seconds)

Any idea? I'm not used to NetBeans and ran it only for its nice profiler until now.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[May 21, 2010, 6:42:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved