Creating Quick and
Powerful Web
Applications with
MySQL, GlassFish, and
NetBeans/Eclipse



Arun Gupta, GlassFish Guy
http...
Who is Arun ?
• GlassFish Guy
• With Sun for over 10 years
• Specifications, Engineering, Standards,
Interoperability, ......
What is GlassFish ?

• Open Source Community
  > Users, Partners, Testers, Developers, ...
  > Started in 2005 on java.net...
State of GlassFish

• GlassFish v2
 >   Java EE 5 Reference Implementation
 >   Clustering, Load Balancing, High Availabil...
Sun GlassFish Enterprise Server


                                            Enterprise Manager



                     C...
Demo: JDBC Connection Pool &
     Resource creation using
     Administration Console




       Creating Quick and Powerf...
Java Persistence API
• Java specification that defines Object to
  Relational Mapping in Java EE 5
• Annotations to persis...
JPA Sample
@Entity class Employee {
     @Id private int id;
     private String firstName;
     private String lastName;
...
Demo: CRUD operations using
     NetBeans, JPA, and
     GlassFish




http://blogs.sun.com/arungupta/entry/totd_38_creati...
RESTful Web Services

• JAX-RS: Java API for RESTful Web services
• Annotation-based server-side API
• HTTP Centric
• Jers...
JAX-RS Sample
@Path("widgets/{id}")
@Produces("application/widgets+xml")
@Consumes("application/widgets+xml")
public class...
GET /NetBeans/6.5




       Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse   12
Demo: Publish your MySQL Table
     as a RESTful Web service




http://blogs.sun.com/arungupta/entry/restful_representati...
Dynamic Languages and
  Web Frameworks




http://glassfish-scripting.dev.java.net
              Creating Quick and Powerf...
Rails on GlassFish

• Native Deployment, no packaging required
  > GlassFish v3
  > Capistrano recipes available
  > Serve...
Tooling
 • NetBeans support
   > Develop, deploy debug




          Creating Quick and Powerful Web Applications with MyS...
Demo: Develop, Deploy, and Debug
     Rails application using
     NetBeans and GlassFish



http://blogs.sun.com/arungupt...
GlassFish v3 Monitoring
• Event-driven light-weight and non-intrusive monitoring
• Modules provide domain specific probes ...
Demo: End-to-End Application
      Tracing using NetBeans, GlassFish,
      MySQL, OpenSolaris, DTrace




        Creatin...
GlassFish Tools Bundle for Eclipse




       Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetB...
GlassFish Tools Bundle – Key Features
• Out-of-the-box installer with all Java EE Eclipse Standard
  Features, JDK and Gla...
More Features ...
• All Sun DTDs registered for validation/code completion
• All Java EE APIs registered for code
  comple...
Demo: GlassFish Tools Bundle
      for Eclipse




http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug

 ...
Price Performance
SpecjAppServer2004 (Nov 2008)

  • 2% cost of Dell, 5% cost of HP
  • 13 times better price/performance
...
Why GlassFish and MySQL ?

• Same pricing strategy – per server, unlimited
• Same support levels – Gold, Silver, ...
• Sam...
References

• GlassFish
  > http://glassfish.org
  > http://blogs.sun.com/theaquarium_br
• NetBeans
  > http://netbeans.or...
Upcoming SlideShare
Loading in...5
×

Glassfish - FISL10 - Arun Gupta

2,056

Published on

Creating quick and powerful web applications with MySQL, GlassFish and Netbeans

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,056
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
43
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Glassfish - FISL10 - Arun Gupta

  1. 1. Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse Arun Gupta, GlassFish Guy http://blogs.sun.com/arungupta Sun Microsystems, Inc. 1
  2. 2. Who is Arun ? • GlassFish Guy • With Sun for over 10 years • Specifications, Engineering, Standards, Interoperability, ... > blogs.sun.com/arungupta > twitter.com/arungupta Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 2
  3. 3. What is GlassFish ? • Open Source Community > Users, Partners, Testers, Developers, ... > Started in 2005 on java.net • Application Server > Java EE 5 and 6 Reference Implementation > Enterprise Quality and Open Source > Full Commercial Support from Sun Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 3
  4. 4. State of GlassFish • GlassFish v2 > Java EE 5 Reference Implementation > Clustering, Load Balancing, High Availability > Web-based/CLI Administration Console > .NET 3.x/4.x Web services Interoperability > Current Release: 2.1 • GlassFish v3 > Java EE 6 Reference Implementation > Modular (OSGi), Embeddable, Extensible > Java EE, Rails, Grails, Django, ... > Current Release: v3 Preview Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 4
  5. 5. Sun GlassFish Enterprise Server Enterprise Manager Customer Advocate eLearning Credit Customer Focused 24x7 Support Support Team GlassFish Sun VIP Open Source Interoperability Application Server Patches & Support Upgrades Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 5
  6. 6. Demo: JDBC Connection Pool & Resource creation using Administration Console Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 6
  7. 7. Java Persistence API • Java specification that defines Object to Relational Mapping in Java EE 5 • Annotations to persist POJOs • JPQL to query objects from the database >MySQL-specific query statements (LIMIT) • Requires a Persistence Provider and a Database >Common Persistence Providers: TopLinkEssentials, EclipseLink JPA, ... >Common Databases: MySQL, Oracle, ... Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 7
  8. 8. JPA Sample @Entity class Employee { @Id private int id; private String firstName; private String lastName; pubic Employee (int id, String firstName, String lastName) { ... } public String getFullName(){ return firstName + lastName; } ... } Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 8
  9. 9. Demo: CRUD operations using NetBeans, JPA, and GlassFish http://blogs.sun.com/arungupta/entry/totd_38_creating_a_mysql Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 9
  10. 10. RESTful Web Services • JAX-RS: Java API for RESTful Web services • Annotation-based server-side API • HTTP Centric • Jersey: Reference Implementation of JAX-RS • Also provides client-side API • jersey.dev.java.net Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 10
  11. 11. JAX-RS Sample @Path("widgets/{id}") @Produces("application/widgets+xml") @Consumes("application/widgets+xml") public class WidgetResource { private Widget w; public WidgetResource(@PathParam("id") String id) { this.w = locateRecord(id); } @GET Widget getWidget() { return w; } @PUT Widget updateWidget(Widget update) { w = processUpdate(update); return w; } } Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 11
  12. 12. GET /NetBeans/6.5 Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 12
  13. 13. Demo: Publish your MySQL Table as a RESTful Web service http://blogs.sun.com/arungupta/entry/restful_representation_of_sakila_using Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 13
  14. 14. Dynamic Languages and Web Frameworks http://glassfish-scripting.dev.java.net Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 14
  15. 15. Rails on GlassFish • Native Deployment, no packaging required > GlassFish v3 > Capistrano recipes available > Server runtime available as Gem • WAR deployment using Warbler > GlassFish v2 and v3 • JRuby/Rails (Groovy/Grails, Django/Jython) modules at Update Center • Commercially supported by Sun Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 15
  16. 16. Tooling • NetBeans support > Develop, deploy debug Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 16
  17. 17. Demo: Develop, Deploy, and Debug Rails application using NetBeans and GlassFish http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 17
  18. 18. GlassFish v3 Monitoring • Event-driven light-weight and non-intrusive monitoring • Modules provide domain specific probes (monitoring events) > EJB, Web, Connector, JPA, Jersey, Orb • Monitoring data gathered on demand • End-to-end monitoring on Solaris platforms using DTrace • Equivalent functionality for GlassFish on other platforms (including Solaris) using scripting languages > JavaScript to start with Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 18
  19. 19. Demo: End-to-End Application Tracing using NetBeans, GlassFish, MySQL, OpenSolaris, DTrace Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 19
  20. 20. GlassFish Tools Bundle for Eclipse Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 20
  21. 21. GlassFish Tools Bundle – Key Features • Out-of-the-box installer with all Java EE Eclipse Standard Features, JDK and GlassFish servers • GlassFish Registration Wizard • GlassFish v2.1 and v3 automatic domain creation/configuration • JavaDB configuration, JDBC resource wizard • Start, Stop, Deploy, Undeploy, Debug JSP/Java • Deploy on Save: Default for v3 • HTTP Monitoring preconfigured Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 21
  22. 22. More Features ... • All Sun DTDs registered for validation/code completion • All Java EE APIs registered for code completion/Javadocs • GlassFish log integrated into Eclipse IDE console • All v2 and v3 DocBooks integrated in Help • GlassFish Web Properties in Help menu (The Aquarium, Support, ...) • ... • Download: http://download.java.net/glassfish/eclipse Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 22
  23. 23. Demo: GlassFish Tools Bundle for Eclipse http://blogs.sun.com/arungupta/entry/screencast_26_develop_run_debug Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 23
  24. 24. Price Performance SpecjAppServer2004 (Nov 2008) • 2% cost of Dell, 5% cost of HP • 13 times better price/performance http://www.sun.com/servers/x64/x4150/benchmarks.jsp#3 Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 24
  25. 25. Why GlassFish and MySQL ? • Same pricing strategy – per server, unlimited • Same support levels – Gold, Silver, ... • Same support organization – No buck passing • Combined reference architectures > MySQL cluster and Sailfin: http://www.sun.com/offers/details/mysql_cg_service_execution.html Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 25
  26. 26. References • GlassFish > http://glassfish.org > http://blogs.sun.com/theaquarium_br • NetBeans > http://netbeans.org > http://planetnetbeans.org/ • Eclipse: http://download.java.net/glasfish/eclipse • MySQL: http://mysql.org • http://blogs.sun.com/arungupta Creating Quick and Powerful Web Applications with MySQL, GlassFish, and NetBeans/Eclipse 26
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×