This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | CRUD samples based on the NetBeans Platform | ||
---|---|---|---|
Product: | usersguide | Reporter: | puce <puce> |
Component: | Code | Assignee: | Geertjan Wielenga <geertjan> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | rmichalsky, tomwheeler |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 155214 |
Description
puce
2008-09-06 12:26:51 UTC
reassign to documentation for evaluation I think this is a great idea Would be great to have this. I thought about adding JPA support to apisupport wizards and such a tutorial would help a lot. I plan on turning this outline into a tutorial: http://blogs.sun.com/geertjan/entry/connecting_to_a_database_from Would that be sufficient to resolve this issue? Geertjan, I assume you would use beans binding and JPA or Hibernate to help here? I think it's a good start, but it would be good to have a little "bigger" sample, as proposed in the description of this issue. We need tutorials that show us how everything can come together for JPA and EJB applications: - the Node/Explorer API (refresh on change) - cookies and actions for Nodes - cookies and actions for toolbars/menus - 2 or 3 TopComponents and their interaction (Master/ Detail) I know it's work (and that time is money), but I think it would be good to have such a tutorial from one who knows the NetBeans Platform and can tell us, "how you do it" with the NetBeans Platform. Trying by ourselves really takes A LOT of time to figure that out, even after reading a whole book about the NetBeans Platform and several tutorials, and then one is still not sure if it has been done "the right way". One who has read less has almost no chance at all, I think. From the dev@openide.netbeans.org mailing list: "A recap to anyone else trying to get a nb platform module suite to connect to your ejb's on a glassfish server": http://forums.netbeans.org/topic3722-0-asc-15.html (Start of the topic: http://forums.netbeans.org/topic3722-0-asc-0.html) Here some more documentation on this topic is in progress: http://wiki.netbeans.org/NBDTRCPAndJEEBestPractices Began making a prototype today: http://blogs.sun.com/geertjan/entry/netbeans_platform_crud There is already plenty of info on the "GlassFish + NetBeans Platform scenario", which is one of the scenarios that this issue seems to be concerned with. Here are some of them: http://wiki.netbeans.org/DevFaqAppClientOnNbPlatformTut http://blogs.sun.com/geertjan/entry/deploying_swing_as_an_application http://blogs.sun.com/blog/entry/java_ee_application_client_on http://wiki.netbeans.org/DevFaqCallEjbFromNbm Set milestone to 7.0. http://netbeans.dzone.com/news/eclipselink-netbeans-platform Above is yet another article (new as of today) describing a CRUD-related scenario. puce, is this getting closer to what you were thinking about when you wrote this issue?: http://blogs.sun.com/geertjan/entry/status_report_on_the_year Look at that and then please specify, i.e., prioritize which of the various things you've listed are most important to you to have included. Please don't say 'all'. Please prioritize. Hi Geertjan, thanks for your work! It's great to see more documented business scenarios! :-) As for the priorization: Well, since you dropped the BeansBinding framework (which is a pity since I liked it, but I also see some of the reasons) I will not priorize it here either - which at least allows us to focus on other parts. Since you started with a JPA CRUD application we also leave the EJB and WebService scenarios for later (though they might be more relevant to most real-world projects.) I agree with your next step: 1. edit & save functionality Then I suggest to continue with: 2. Update CustomerChildFactory on save. 3. Make sure the Properties TopComponent always shows the currently selected data - no matter if the Customer List TopComponent, the Editor TopComponent or the Properties TopComponent itself has focus, Maybe add the Customer object to the Lookup of the Node/ TopComponent? Better way? 4. Show where and how to intialize the EntityManager/ EntityManagerFactory and how to pass it to the other components. In the module installer? Passed via a custom Lookup which spans one or several (dependent) modules? Best practice how to implement such a Lookup? 5. New & Delete actions (to make the CRUD round-trip complete) 6. More about best practices when working with JPA. Use attached/ detached objects? Provide a data access layer? (For others: also see the discussion on the dev@openide.netbeans.org mailing list, topic "From JPA Entity to NetBeans Node?".) Puce, what do you mean by "since you dropped the beans binding framework"? Activity on it has definitely slowed (and it's unfortunate that apparently it won't be a standard part of JDK 7), but it's still very useful and support for it is still in the IDE Geertjan dropped BeansBinding for now in his blog samples (the base of these tutorials). Yes. Since it won't be in JDK 7, I'd rather not use it in this example. Plus, I'd have to go out of my way to find a place for it in the context of this example. Both of those reasons mean that it's better to not include it. Here's the next part of the series, published yesterday, with some tweaks today, laying the groundwork for several of the items in puce's list: http://netbeans.dzone.com/news/hello-eclipselink-modularity-n PS: It would help a lot if everyone reading this issue would read these articles and vote for them (more people will get to read them if it becomes more popular). Re beans binding being dead, I certainly thought it was. There has not been any official change in the status of the JSR since 2006: http://jcp.org/en/jsr/detail?id=295 And the last release of beans binding was in 2007. As far as I can tell from looking at their issue tracker, there has not been a single issue resolved since then, although more than 20 issues marked as DEFECT have been submitted in that time (in addition to a dozen more DEFECTS that were filed earlier and still unresolved). IIRC, Scott Violet was the original author but passed it on to Shannon Hickey when he left Sun. Now it seems that Shannon has left Sun too. The new maintainer (Richard Bair) has blogged about JavaFX and a little about the Swing Application Framework, but I was not able to find anything in his blog about beans binding (with the exception of comments from others wanting to know its status too). So despite the IDE currently having support for beans binding, the future does not look bright for the framework. Since applications hopefully outlast a particular version of the IDE, I appreciate that the articles in this series have changed to explore other approaches. The article on explorer views and property sheets was particularly relevant and informative in this regard. <object width="480" height="376"><param name="movie" value="http://mediacast.sun.com/flash/jw-flv-player/mediaplayer.swf?width=480&height=360&autostart=false&type=flv&file=http%3A%2F%2Fmediacast.sun.com%2Fusers%2FGWiel%2Fmedia%2FCrudNetBeansPlatform.flv"/><param name="allowFullScreen" value="true"/><embed src="http://mediacast.sun.com/flash/jw-flv-player/mediaplayer.swf?width=480&height=360&autostart=false&type=flv&file=http%3A%2F%2Fmediacast.sun.com%2Fusers%2FGWiel%2Fmedia%2FCrudNetBeansPlatform.flv" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="376"></embed></object> Here's where I'm creating the tutorial, currently in draft form: http://platform.netbeans.org/tutorials/nbm-crud.html Feedback welcome. I believe this item is now fixed. If not please reopen it. |