• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
December 4 SDForum Java Sig Presentation
 

December 4 SDForum Java Sig Presentation

on

  • 9,820 views

December 4 SDForum Java Sig Presentation - Jonathan Abrams

December 4 SDForum Java Sig Presentation - Jonathan Abrams

Statistics

Views

Total Views
9,820
Views on SlideShare
9,808
Embed Views
12

Actions

Likes
3
Downloads
160
Comments
2

1 Embed 12

http://www.slideshare.net 12

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • yes the Java world is over complex for sure. Part of that is the price of the power and flexibility you get with all the Java technologies. Part of it is that Java is a lot older (at least in terms of popular usage) than PHP, Ruby, or Python (none of which I remember hearing about back in say 1996 when I worked as an engineer in Netscape's Java group). In ten years, there might be 10 confusingly overlapping frameworks for Ruby too...<br /><br/>
    Are you sure you want to
    Your message goes here
    Processing…
  • This is a great presentation, and a nice reality check for Ruby / Php people. Obviously Java scales fine if you do it right ... the problem is that there is so much complexity in the Java world, and the culture of Java programmers often emphasizes other things (code maintainability, I18N, pretty design patterns, etc) besides scaling. So you have to dig a bit deeper than in the php / ruby world before you even find out about stuff like memcached!

    There's probably a book in here somewhere about building consumer internet sites in Java. Not that you want to write a book, but somebody should.<br /><br/>
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    December 4 SDForum Java Sig Presentation December 4 SDForum Java Sig Presentation Presentation Transcript

    • Jonathan Abrams SDForum Java SIG December 4, 2007 Building High-Traffic Java-Based Web Applications
    • Popular Languages for Web Apps
      • Ruby/RoR
        • Hot & trendy!
        • Many small web 2.0 startups
        • Unknown scalability (Twitter)
      • PHP
        • Facebook, Friendster, Yahoo
        • Proven and very popular
        • No connection pooling?
        • Page-oriented, not usually MVC?
        • Maintainability?
      • Python
        • Has its fans (Yelp, YouTube?), somewhat similar to Ruby?
        • Less common than Ruby or PHP
    • Java Misconceptions
      • Overly complicated
      • No longer relevant
      • Doesn’t scale as well as PHP
      • Strongly typed is bad/hard vs. Ruby/PHP
      • Takes more code and more time
      • Cannot rapidly prototype
    • Tim Bray - Nov 2006 “Comparing Frameworks”
      • “ For Web apps, I’ve given PHP the edge, because I think building scalable PHP is a little easier . By default, PHP gives you a “shared-nothing” (or at least “shared very little”) architecture, which means you’re going to scale out pretty well until your database hits the wall. Java is a much richer system and assumes you’re smart enough to know whether a shared-nothing architecture is appropriate or not. The effect is, you have to be smarter to get the same kind of scaling out of Java.”
    • Java Realities
      • Very mature and proven
      • Excellent performance (fast JVM/JIT)
      • Scales fine unless you use it wrong (sessions, large heaps)
      • Powerful and flexible
        • Cross-platform
        • Server, client, desktop, mobile, etc.
    • Java Realities
      • Strong typing can actually be a big help (plus JSP/EL handles type conversions and you can also use Object or polymorphism)
      • You can write quick spaghetti code in JSP!
      • JSP is great for rapid prototyping, modified JSPs are automatically recompiled in development
      • J2EE and breadth of Java technologies and frameworks IS complicated!
    • Ruby on Rails vs. Java?
      • Groovy/Grails
      • JRuby
      • Object/relational mapping (Hibernate?)
      • Code by convention (servlet mapping via servlet filter, instead of controller servlet or web.xml?)
    • Who is using Java?
      • Social Networks
      • (Friendster)
      • Bebo
      • Hi5
      • Tagged
      • Tickle
      • Classmates.com
      • Events
      • eVite
      • MeetUp
      • Socializr
      • Involver
    • Who is using Java?
      • E-Commerce
      • Air Canada
      • Bank of America
      • Bestbuy.com
      • Billboard.com
      • Blue Nile
      • Citysearch
      • DICE
      • DirecTV
      • Fedex
      • Hallmark.com
      • Hertz
      • Startups
      • Daily Candy
      • Feedburner
      • Indeed.com
      • Instructables
      • Jaxtr
      • Kaboodle
      • Like.com
      • LinkedIn
      • Mint
      • Ning
      • Zillow
      • Hotwire
      • Kayak
      • Kodak/Ofoto
      • Macy's
      • NY Times
      • Shutterfly
      • Snapfish
      • Stamps.com
      • Staples.com
      • Ticketweb
      • Vault.com
      • Walgreens.com
    • J2EE vs. POJO J2EE The standard for developing multitier enterprise applications POJO Plain Old Java Object
    • Web App Frameworks Struts An open source framework for building Servlet/JSP based web applications based on the Model-View-Controller (MVC) design paradigm WebWorks WebWork is a Java web-application development framework Struts2 Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. Apache Struts 2 was originally known as WebWork 2 Spring Framework Spring is a layered Java/J2EE application framework with a flexible MVC web application framework Maverick Maverick is a Model-View-Controller (aka &quot;Model 2&quot;) framework for web publishing using Java and J2EE. In principle it combines the best features of Struts, WebWork, and Cocoon2
    • More Frameworks JSF JavaServer Faces technology is a framework for building user interfaces for web applications Facelets An alternative view technology for building JSF applications Tapestry Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java Velocity The Apache Velocity Engine is a free open-source templating engine. Velocity permits you to use a simple yet powerful template language to reference objects defined in Java code. Tiles Apache Tiles is a templating framework built to simplify the development of web application user interfaces. Tiles grew in popularity as a component of the popular Struts framework. It has since been extracted from Struts and is now integrated with various frameworks, such as Struts 2 and Shale. Shale Shale is a modern web application framework, fundamentally based on JavaServer Faces
    • Even More Frameworks Seam JBoss Seam is a powerful new application framework for building next generation Web 2.0 applications Helma Helma is an open source web application framework for fast and efficient scripting and serving of your websites and Internet applications. Wicket With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again Rife Full-stack open-source component framework to quickly and consistently develop and maintain Java web applications
    • Yet More Frameworks jMaki (GlassFish) jMaki is an Ajax framework that provides a lightweight model for creating JavaScript centric Ajax-enabled web applications using Java, Ruby, PHP, and Phobos XMLC XMLC is a presentation technology that provides an object-oriented mechanism for creating dynamic content from static HTML and XML documents Grails Grails aims to bring the &quot;coding by convention&quot; paradigm to Groovy. It's an open-source web application framework that leverages the Groovy language and complements Java Web GWT Google Web Toolkit (GWT) is an open source Java development framework that lets you escape the matrix of technologies that make writing AJAX applications so difficult and error prone.
    • Object/Relational Mapping
      • Hibernate
      • JDO
      • TopLink (Oracle -> GlassFish)
      • iBatis ( XML-based Object/Relational mapping and persistence framework) ibatis.apache.org
    • Ancient History of Servlets
      • 1999 – HotLinks (social bookmarking)
        • Apache JServ, Solaris, Oracle
        • Servlets writing HTML - ouch
      • 2002 – Friendster
        • JSP 1.0, Tomcat, MySQL
        • Java mixed with HTML
        • Servlets
        • No tag files
    • JSP/Servlets Today
      • 2006 – Socializr
        • JSP 2.0
        • JSTL/EL
        • Tag files written in JSP, SimpleTagSupport, functions, beans
        • Servlets
        • Documentation and support of JSP 2.0/JSTL/tag files poor compared to PHP/ruby/etc.
        • Scriptlets required to access Java constants from JSPs
    • Servlet/JSP Technologies
      • JSP pages
      • JSP fragments
      • EL
      • JSTL
      • .tag files
      • Tag classes
      • functions
      • servlets
      • beans
      • Complicated but powerful/flexible
    • Socializr Java Architecture
    • JSP vs. Servlet? Tag class or function Reusable non-UI code JSP HTML email templates Servlets REST APIs Servlets with ROME RSS feeds Java classes (beans) Data classes and DAOs Tag file Reusable UI component Servlet Logic, modify DB JSP Web page, HTML
    • Hi5 and Bebo Examples
      • Hi5
      • JSP
      • Struts
      • iBatis
      • some Spring libraries
      • Bebo
      • No frameworks
      • JSP
      • Simple in-house MVC
      • Memcached
      • No hibernate
    • Servlet Containers
      • Past
      • Tomcat
      • Jetty
      • Resin
      • Future
      • Tomcat
      • Grizzly (NIO front-end to Glassfish)
    • How to scale a webapp
      • Lightweight non-sticky sessions
      • Cache almost everything (memcached)
      • Decouple slow processes from webapp
      • Segment the database (don’t use replication to scale)
      • Scale out not up (innovate on your app, not your infrastructure)
    • Session Management
      • Use simple lightweight sessions, store in centralized location that can be volatile (memcached at Socializr)
      • 9F6077E3322B4E24C90C43178F42B9C0FFD1E4A43AED1BCA –> 656280029
      • Keep other user data in cache or cookies
      • Avoid sticky sessions, keep load balancing simple
      • Don’t use built-in Servlet/JSP sessions
    • Evite Session Management
    • Caching
      • Use memcached, don’t invent your own
      • Put a large memcached instance on every webapp node
      • Don’t cache inside JVM
      • Cache almost everything but think of your expiration strategy and invalidation rules
    • Performance Tuning
      • JRat - jrat.sourceforge.net
      • Example: JSTL FormatDate
      • Other cool tools: Lambda Probe, FindBugs
    • Java Technologies
      • Apache commons: DBCP (Connection Pooling), HttpClient, File Upload
      • Connector/J (MySQL JDBC driver)
      • Memcached Java client
      • JMagick (poorly documented) (not JAI)
      • JDOM (for APIs) and StAX (for SolrJ) (XML parsing)
      • ROME (RSS)
      • JavaMail (SMTP and POP)
      • Quartz (scheduling)
      • Apache XML-RPC
      • SolrJ
      • JMS
    • Thank You
      • [email_address]
      • www.socializr.com/jobs