Adam Bien's Weblog   

Wednesday Dec 03, 2008

Netbeans 6.5: Nice "Hidden" Feature In The SQL Explorer

  1. Open the tab "Services" (Ctrl+5)
  2. Connect to a database
  3. Select a table and invoke "View Data" from the context menu
  4. The data will be displayed in a table.
  5. Right click on row in the table. A context menu with "Insert Record", "Delete Recort" ...Show SQL Script etc. should open. These are actually useful functions which create Insert, Update, Delete and even create statements for you. The create statements are not always syntactically correct (they sometimes end with a comma), but useful anyway.
What I miss is the no more existing visual explorer. It disappeared in NB 6.1. It was possible with "Design Query" wizard to visualize table and connections between them. I never used it to actually design a query, but just to visualize the relations between tables.


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Tuesday Dec 02, 2008

Your Architecture Starts To Be Sub-Optimal If:

  1. There are lot of experts involved, but no one is really excited.
  2. You are talking for more than one day about concepts and architectures, without a single Proof Of Concept or even discussing some code.
  3. You are just selling the features - without explaining the consequences.
  4. Your are starting with a multi-layer architecture without highlighting the "added value" of each layer and its individual responsibilities
  5. You are searching for the "silver bullet" architecture, with that all already known and even future requirements can be fulfilled.
  6. You are trying to identify hotspots and shortcomings in advance with ...UML.
  7. There is no clear vision defined - there is no clear relation between the vision and the resulting architecture.
  8. The is no secondary strategy - you have only one "master plan"
  9. You are thinking in pictures - not in code. You are believing, that pictures are more valuable, than code.
  10. The architect believes, that he can be smarter / have more experience than his whole development team.


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Saturday Nov 29, 2008

Save The Date, December 4th 2008 - And Wait For Java FX 1.0

It seems like Java FX will be released at December 4th, 2008. I'm already curious about the difference / added value to the currently available preview. But don't be afraid, Swing will not disappear at this date. Even SWT/JFace should survive :-)!


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Friday Nov 28, 2008

Top Eight, Non Java, Netbeans 6.5 Features

  1. CSS editor: with syntax highlighting, code completion and preview.
  2. HTML editor with auto completion, syntax highlighting, basic drag and drop
  3. CVS, Subversion, Mercurial integration: I use it e.g. to synchronize the chapters of my current book with oreilly.
  4. JavaScript editor / debug support
  5. Favorites: The ability to browse the file system and edit files. NB can be used as a generic editor.
  6. Services: Great database viewer with paging, inline editing etc.
  7. UML support (additional 7MB plugin): really good tool for creating overview diagrams etc. I used it to illustrating my recent books and articles. I saved a lot of time :-).
  8. Java FX support (additional plugin): compiling, debugging, auto completion, draggable applets, web start etc.
  9. Diff functionality: you can diff any files you like. [I forgot this point in the origin post :-)].
...and Groovy, Grails, PHP, Scala, Python support - I do not use them, however, in my current projects.


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Thursday Nov 27, 2008

Six Swing Lies:

  1. Swing is slow:
    One of my first serious Swing projects started for me about about 1999 / 2001. At that time we had P4 400 MHz machines with 128 MB - 256 MB RAM. We had performance problems with almost everything but not Swing. Of course from time to time someone managed to block the UI-thread, but I wouldn't categorize that as Swing performance issue.
  2. Swing is hard to understand and too complex:
    From my perspective it is straightforward. The UI-components throw many different, fine grained events, but this is needed for more serious applications. I introduced Swing to some non-Java developers and they were able to built amazingly complex Swing apps after a short period of time.
  3. Swing doesn't looks good:
    In general: Swing can look as good, as your designed skills allow. There are no limits. Even better: there are already fantastic, free look and feels out there like: substance, nimbus (comes JDK 1.6.u10) or napkin (:-)). I have a task for you as well: Find a "power" IntelliJ developer. Say to him "IntelliJ looks like crap". Way for reaction but be guarded :-).
  4. Swing doesn't integrate well with the operating system, doesn't looks natively:
    And Eclipse, Office 2007 do? E.g. Eclipse Forms looks good, but not like Vista. There was no requirement I remember so far in my projects so far. Neither in Eclipse RCP, nor in Netbeans RCP projets. I hear this argument a lot at conferences, but not in projects :-). Btw. OS integration was greatly improved in JDK 1.6u10.
  5. JavaFX will swallow Swing:
    Will JPA swallow JDBC, Swing Java 2D or JSF Servlets? Most of the JavaFX widgets are Swing based. In future new widgets will be developed in JavaFX entirely for sure. But this is a good thing. Right now Swing is widely used by big companies.
  6. Swing is EOL / will die because SwingX is no more founded by Sun:
    Swing is part of JDK. Main criticiscm of the "deprecated" mechanism in Java is the actually nothing was removed yet. Event new tools like JConsole or VisualVM shipped with JDK 1.6+  are Swing based. See this post as well. Netbeans is Swing based also (and looks great).
This post was inspired by the the following comment.


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Wednesday Nov 26, 2008

Swing Is Especially Effective If:

  1. You know your target domain or business logic, so that you are able to design expressive and concise domain objects.
  2. You are thinking in "swing models", not the UI-components. If you understand your domain, you probably have an idea as well how to visualize the business concepts in object oriented way. The use of Swing models just becomes natural.
  3. You are starting with the domain objects covered with unit tests, then develop the Swing models - after that the work is almost complete. You "only" have to create the view and pass the model to it.
  4. You are NOT trying to work with the views directly and force them to behave in your way. This could become quite complex, cumbersome and very hard to maintain. E.g. if you are working with the JTable directly, instead of TableModel, even reordering the table columns can cause you some headaches. The are no issues with a custom model in this case.
  5. The use of TableCellRenderers and TableCellEditors in JTables helps you to visualize you domain objects directly - without any overhead.
  6. You are using visual designers like e.g. Matisse in pragmatic way and separate the generated, from your code.
  7. You have a clear concept how to bind (e.g. with reflection+annotations or JSR-295) the UI-components to domain objects and how and where to validate the input (e.g. in controllers, domain objects or converters). 
  8. Try to leverage existing JavaBean patterns like PropertyChangeListener, PropertyChangeSupport and the already built-in listeners in the UI-components. There is lot of stuff which can be reused.
  9. If you spend more, than half hour to solve a specific "Swing-problem", just stop hacking and use google to find a solution for your problem. There are amazingly good tutorials, articles and posts out there.
  10. If you loose your motivation. Just stop developing Swing, build a quick prototype with SWT/JFace for few hours (but use Tables and Trees). Your motivation should increase dramatically after this experiment :-)


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Monday Nov 24, 2008

Netbeans 6.5 Is Out - And I'm Not Very Excited [RC 2 was too good...]

I installed Netbeans 6.5 (with EE) and migrated all configuration from 6.5 RC2. Some observations:

  1. The performance seems to be better. At least after a fresh installation.
  2. The SQL-explorer was greatly improved, comparing it to 6.1. Especially pagination, auto-completion and "in-place" updating the database.
  3. STRG+I is really useful. Especially the "Recent Searches" saves me a lot of time. The first access is a bit slow...
  4. HTML and CSS editors are working surprisingly well. CSS comes even with usable preview. I use both in all my web projects. Is especially useful for Wicket development.
  5. Diff functionality is great. Just right click on the tab and "Diff to".
  6. Deploy on save works really good with Glassfish v2 and v3 Prelude. I used it in my current Wicket project. The only shortcoming: changes in HTML-files are not recognized.
  7. EJB 3, JPA support is good - everything is working as expected, some functionality moved from a menu to the Alt-Insert pop-up which is a good thing.
  8. I didn't used Netbeans for Groovy development yet in commercial projects, but the Greenfire's configuration was immediately recognized.
  9. The UML support works and is nice. I just miss the component / deployment diagram. It was (in 6.1) really useful.
  10. The performance under Vista is good, but I had the chance to work for few days with NB on Ubuntu - it was lightening fast...

So why I'm not excited? The problem is: the RC2 was too good. I didn't have any major issues. It just worked. Next time Sun Engineers should artificially slow down the RCs and remove it in the final version :-). And I still miss EJB 3.1 support for GF v3 prelude. It's not just me - I'm asked over and over again about this feature.


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Monday Nov 17, 2008

Glassfish v3 Prelude Ready For Production?

I'm one of the FishCats - so I had the chance to test Glassfish v3 intensively this summer. I have some serious customers - so I didn't posted about this, because of the program's name. I don't know whether it is beneficial for a freelancer / consultant to be named a FishCat :-).

The technologies I'm interested in (Java EE, transactions, EJB) were surprisingly stable during the tests. I found some minor bugs as expected in the new stuff - especially the dynamic installation of EJB Container, Netbeans Plugin integration, log viewers, administration console etc. I filed some RFEs - it was a pleasant experience - I got immediate feedback from the engineers. Most of the bugs were already solved, the majority of the RFEs accepted. The persistence layer is stable; EclipseLink is based on TopLink which is part of Glassfish v2 and really mature (it's history started in actually in Smalltalk). I use Glassfish v2 in production already in many projects (some migrations as well), and the JPA-persistence is really stable.

In the latest Prelude version I tested (b28c) most of the problems were already fixed, it worked perfect with Netbeans 6.5 rc2 (Glassfish v3 comes already with Netbeans as well). However the EJB 3.1 support is not complete yet (one of the reasons might be the unfinished spec :-)) and there is no complete EJB 3.0 implementation available - so I neither can recommend it to my customers, nor use it in my projects.

Interestingly, there is commercial support available for Glassfish v3 Prelude already, with very clear CPU-core independent pricing. This strategy is especially interesting for Niagara CPUs - they have lot of threads to offer for one socket:-). Commercial support makes GF v3 Prelude even interesting for Mission Critical projects (after an evaluation phase, of course).

I would still expect some problems in development with classloading / OSGI kernel (it's new technology - so there have to be still some bugs), but such issues should be easily fixable. The engineering / community was extremely responsibe, at least during the program.

I'm still waiting for the "traditional" EJB 3.0/1 support and especially for embedding features - after that Prelude v3 will become the killer platform for a secret weapon, especially with the new monitoring capabilities. After the availability of full EJB 3.0 support I would immediately recommend GF v3 Prelude even for projects with the need for transaction management / concurrency / messaging (=most of the enterprise projects).


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Tuesday Nov 11, 2008

Java EE 5/6 in German Museum

This week a give a workshop with the title: "(Ultra) Lightweight Java EE - the killer platform for efficient development" in Munich. The funny story about it: the location is the German Museum :-). Probably I should think about that :-). Groovy and even C# workshops are hold here as well - so there is still some hope.

Fortunately the group is small (no surprise - just after w-jax conference, in Munich as well)  so we have enough time to cover all (even project specific) questions. We are using Netbeans 6.5 RC2 and Glassfish v2 / v3 for the samples (I offered Ganymede on the CD as well but no-one installed it :-)) - and we were able to develop some examples with EJB 3 / JPA, interceptors already.


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

Wednesday Nov 05, 2008

Eclipse RCP vs. Netbeans RCP - and what really counts

I'm back from Netbeans World Tour from Poland so I'm totally unbiased :-).  During the tour we discussed Eclipse RCP vs. Netbeans RCP again. Actually all of the comparisons I know right now are feature by feature comparisons, which are not very interesting for a real world project. Who cares about a slightly better help, or a different configuration of the menu system?. Both platforms are very comparable; Netbeans relies heavily on the ServiceLoader, which is part of JDK 1.6 and Eclipse RCP uses OSGI which is JSR-291 and will become indirectly a standard (via JSR-277). I read several comparisons, attended at JavaONE 2008 sessions, and all comparisons were so far somehow theoretic if not esoteric.

Because both platform have similar feature set and are both really mature (Netbeans RCP is older, whereby Eclipse RCP is more popular), a feature matrix is no more that interesting for choosing the right platform.

The key difference between both is the UI-Framework. Eclipse RCP is based on native SWT / JFace framework, whereby Netbeans is based on Swing. SWT started as an IDE-toolkit, and Swing was designed as application toolkit from the beginning. Swing isn't native, so that you can extend it, change its behavior in unlimited ways. SWT is more limited - some even trivial tasks can become interesting (in one project we spent an amazing amount of time to provide a vertical lable for a caption of a table). In the role of an architect I would always prefer Swing for UI development, because actually there are no limits. Swing is mature - actually too mature, it hadn't change for several years :-). I prefer Swing programming model too - but this is my personal opinion, in both camps developers can become slightly religious about this topic.

In my opinion SWT / JFace is rather a limitation, than an advantage for a business project. From strategic point of view Eclipse RCP could be more interesting because of countless already existing plugins and extensions. This makes Eclipse especially interesting for development / extension of already existing platforms like SAP, IBM etc. OSGI is hyped at the moment - this should be considered choosing between both of the platforms as well. On the other hand, Netbeans RCP is perfect for the migration of already existing Swing applications - which are countless as well. Since JDK 1.6 u7 and u10 Netbeans RCP has a huge advantage- it already exists on every JDK installation - as VisualVM. ...It is a Netbeans RCP application...


[This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 Subscribe in a reader

About,RSS / Atom

About me: www.adam-bien.com
JavaONE 2008 Interview
My Recent Books
Adverts
Search
Links
greenfire.dev.java.net
...the last 150 posts
my.netbeans.org
Visitors
License