Weblogs and Java Dave Johnson Roller Weblogger project Prepared for the Triangle Java User’s Group February 16 th, 2004.

Slides:



Advertisements
Similar presentations
RSS RSS is an acronymn for Really Simple Syndication or Rich Site Summary. RSS (noun) - an XML format for distributing news headlines on the Web. RSS.
Advertisements

On-line media tools for strategic communications purposes When using media tools for communication we try to use the latest technologies such us blogging,
Blogging for Knowledge Exchange Darlene Fichter Data Library Coordinator University of Saskatchewan Library KMWorld 2003.
Come On… Let’s Blog! Lloyd Borrett Wednesday, 6th October 2004.
Social Media.
Apache Struts Technology
A Blackboard Building Block™ Crash Course for Web Developers
BASICS OF BLOGGING. WHAT IS A BLOG? "Blog" is an abbreviated version of "weblog," which is a term used to describe websites that maintain an ongoing chronicle.
CHAPTER 5: RSS THE NEW KILLER APP FOR EDUCATORS By: Christina Cameron & Angel Joseph.
Weblogs Opportunities for Special Libraries Darlene Fichter University of Saskatchewan Saskatoon, SK June 17, 2004.
An Overview. BizLink BizLink is a Social Networking platform for business. It allows colleagues to come together, ask questions, share resources, form.
Blogging and Instant Messaging A very brief introduction! SUNY Potsdam IT Fair 2005 Jenica P. Rogers August 25, 2005.
RSS 2.0: Experience with implementation in a closed Intranet Presented by Mr Ajith Balan Scientific Officer Scientific Information Resource Division Bhabha.
Slide 1 smallbiztrends.com Blogs: Today’s Marketing and Sales Tool for Business SEM Made Simple Anita Campbell – May 2007.
Business Blogging. Reaching Your Customers Educate customers about products Easy user-friendly interface New content displayed at the top Search Engine.
To Wiki or not to Wiki: Why not TikiWiki? Why not TikiWiki? A full-featured, open source, multilingual wiki-based Content Management System
Weblog benefits for research students Maryam Sarrafzadeh.
What is an Intranet? An intranet is a private space that gives a group of people the ability to organize information, readily access that information,
Mark Frydenberg Computer Information Systems Department.
 2008 Pearson Education, Inc. All rights reserved What Is Web 2.0?  Web 1.0 focused on a relatively small number of companies and advertisers.
UWWD In our quest to eliminate bad websites, we present…. HALLELUJAH!!
Meeting of the Matilda Web- Administrators Vienna, April 24 – 25, 2009 Welcome!
UNIT-V The MVC architecture and Struts Framework.
Is it easy to create one? Characteristics Aren’t they just online diaries?
Web 2.0: Concepts and Applications 2 Publishing Online.
Comparing Internet Medias Kaitlyn Stahl CSC 101. Podcasts  A podcast is a digital media file that are shared over the web using syndication feeds, for.
Lecture 5 Title: Networks and Businesses
J2EE Web Fundamentals Lesson 1 Introduction and Overview
Crystal Hoyer Program Manager IIS Team Preview of features that will be announced at MIX09 Please do not blog, take pictures or video of session.
Trimble Connected Community
Adventures in Radio UserLand Lincoln Cushing, UC Berkeley Institute of Industrial Relations Library.
RSS Feeds What, Why, & How… …without a CMS Don Parsons
Wikis are websites where pages can be edited using an online document editor. Users can easily edit and share content. Enterprise wikis are platforms.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
PUBLISHING ONLINE Chapter 2. Overview Blogs and wikis are two Web 2.0 tools that allow users to publish content online Blogs function as online journals.
Overview In this tutorial you will: learn what a blog is understand how blogs may be used in e-learning identify different types of blogs.
What Is Wiki ? Wiki is a piece of server software that allows users to freely create and edit Web page content using any Web browser. Wiki supports hyperlinks.
Web 2.0 Pragith Prakash Vikram Singh By The Era of.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Peter Laird. | 1 Building Dynamic Google Gadgets in Java Peter Laird Managing Architect WebLogic Portal BEA Systems.
Module 3 News Engine, Blogs, Wikis, and RSS feeds Instructional Technology.
OT Connections is AOTA’s new online community which allows occupational therapists, occupational therapy assistants and students to connect with each.
World English Dictionary Web 2.0 —n the Internet viewed as a medium in which interactive experience, in the form of blogs, wikis, forums, etc, plays.
Blogs, Wikis and Podcasting  By Zach, Andrew and Sam.
1 Emerging Technology Using RSS RSS and syndication By Steve Sloan RSS and syndication By Steve Sloan.
“Introduction to Blogging” A Blog By: WordPress.org Mike Mannone ENGL 393 Ms.Harris Summer Session I 2009 Due:
Blogs and Wikis Tim Bornholtz. Purpose Many new technologies are available on the internet that enable people to publish and edit content without expensive.
LIBRARIES MEET THE GRID: Librarians in Cyberspace Virginia Allen Beth Avery.
Overview All Partners Access Network Pacific Warfighting Center US Pacific Command Alex Conway.
IBM Lotus Software © 2006 IBM Corporation IBM Lotus Notes Domino Blog Template Steve Castledine.
Global & Virtual Communication in Education Pam Wright.
Using Web 2.0 Technologies to Create Classroom Websites: Session 3.
Portals: Architecture & Best Practices Greg Hinkle February 2005.
Blogging. Website and blog A website, also written as web site,or simply site, is a set of related web pages typically served from a single web domain.
Lecture 5 Web 2.0 Teaser Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell Exploring the Internet, Fall 2011.
Blogs and RSS Siobhan Champ- Blackwell. Definitions  Blog – Web Log; an online journal; A web page with periodic posts in reverse chronologic order 
Program Assessment User Session Experts (PAUSE) Information Sessions: RSS & Subscription Services October , 2006.
Geeks - FDU Library Staff Meeting - Summer 2007 Geeks Bearing Gifts Unwrapping New Technology Trends.
Kendra Hunter & Charde Johnson EDUC Dr. M. Kariuki.
+ “Introduction to Blogging” Katelyn Jacobsen By WordPress.org.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
■ A blog originally was a personal website meant to be like a diary or journal. ■ Basically a type of website, like a forum or a social bookmarking site.
CREATE, IMPLEMENT AND ENJOY! Blogs,Wikis & RSS Readers.
WebScan: Implementing QueryServer 2.0 Karl Geiger, Amgen Inc. BRS NA UG August 1999.
LIBRARY BLOGS IN THEORY AND PRACTICE Helen Nneka Okpala [ Presentation done at University of Abuja Library Staff Training, 3 rd May.
Feed: RSS/ATOM, Podcast
User Information Architecture: Blogs, Wikis, and RSS
Developing and testing enterprise Java applications
Presentation transcript:

Weblogs and Java Dave Johnson Roller Weblogger project Prepared for the Triangle Java User’s Group February 16 th, 2004

0 - Today’s talk What’s a weblog and why have weblogs become such an important part of the Java community? How you can use weblogs in software development projects. And about the XDoclet-driven architecture of the Roller Weblogger.

What is a weblog? “A blog is a web page made up of usually short, frequently updated posts that are arranged chronologically—like a what's new page or a journal. The content and purposes of blogs varies greatly—from links and commentary about other web sites, to news about a company/person/idea, to diaries, photos, poetry, mini- essays, project updates, even fiction.” - The Blogger.com site “Weblogs are often-updated sites that point to articles elsewhere on the web, often with comments, and to on-site articles.” – Dave Winer

History of weblogging One could consider the “what’s new” pages at CERN, NCSA, and Netscape in the early 1990’s to be the first weblogs. The term weblog originated in late 1997, there were only a couple dozen such sites then. Radio, Blogger, LiveJournal services sprang up during the dot-com boom brings war-blogs, mainstream media blogs, mo-blogging, and political campaign blogs.

1 - The Java weblog community 2002: a couple Java blogs and FreeRoller 2003: explosion of Java blogs  Thousands of JRoller Java blogs  Hundreds of independently hosted Java blogs  Javablogs.com community aggregator  Sun’s Java.NET weblogs  JBoss blogs, Codehaus blogs, etc.

JRoller.com Free Java-oriented weblogging service Started as FreeRoller by Anthony Eden in Javalobby took over in October 2003, re- branded, and now hosts more than 2000 blogs.

Javablogs.com Hub of the Java weblogging community. Started by Atlassian, makers of JIRA issue tracking software. Anybody can register a weblog here, but non-Java blogs are discouraged.

Sun’s Java.NET community site Launched just before JavaONE in July 2003 Weblogs and Wiki are prominently featured Java gurus invited to populate weblogs

Java news you can use… Fresh Java links everyday from Erik Thauvin, featured in JDJ Struts, XHTML, CSS, JavaScript tips, and Java webapp tips from Matt Raible JSP and J2EE webapp tips from WROX author Simon Brown Mobile app. dev. trends from Russell Beattie Ted Neward published a rough draft of Effective Enterprise Java on his blog S/W dev. discussion from Cedric Buest, Senior S/W Engineer, BEA S/W dev. discussion from Cameron Purdy, CEO Tangosol S/W dev. discussion from Charles Miller of Atlassian. And of course:

2 – Weblog software features We already discussed the basics. A weblog is:  An online journal, news site, diary  A personal publishing system  Entries in reverse chronological order Let’s discuss how weblog software makes it easy to write online.

Easy to update your site Easy to add a new weblog entry, even if you have no knowledge of HTML. Easy to categorize posts. Easy to edit old posts. Use a WYSIWYG editor, HTML, or use Wiki syntax.

Common features Permalinks: every post gets it’s own unique and permanent URL. Comments: Some weblogs allow comments on each post, some do not – it’s up to the author. RSS Newsfeeds: so that “subscribers” may read your weblog in a Newsreader. Page Templates: so you can customize the look, feel, and layout of your weblog. Referrer Tracking and Trackback: so you know who is writing about or linking to your weblog entries. Blog-rolling: displaying a list of favorite weblogs and websites.

Anatomy of a weblog

3 - Weblog infrastructure Weblogging is supported by an extensive infrastructure that is built around:  Data formats: RSS, Atom, OPML  Web service APIs: Blogger API, Atom  And good old HTTP Let’s talk about that infrastructure and the applications that build upon it to support weblogging…

Newsfeed syndication A newsfeed is simply an XML representation of titles and entries from a website, made available at a URL. A weblog page: A weblog RSS feed: Most newsfeeds are RSS or RDF. Serious weblog readers use newreaders: on JRoller over 70% of requests come from newsreader software.

Example RSS newsfeed

XML-RPC interface XML-RPC based Blogger API allows posting and editing of weblog entries from weblog client software. MetaWeblog API adds support for titles. XML-RPC was invented to serve this purpose. History of weblog APIs:

Clients Blog clients allow you to:  Post to your own weblog  Post comments to other weblogs Newsreader clients, allow you to:  Subscribe to and read RSS newsfeeds  Import/export subscription lists as OPML

SharpReader – desktop newsreader

Bloglines.com – web newsreader

w:bloggar – blogging client

4 – Weblogs & communities “the web grows communities, almost without trying, because the web is the only media that allows it’s users to communicate with each other directly, publicly, and immediately” - Derek Powazek, Design for Communities Communities are important to technology development and adoption. Weblogs are not the only technology that enable online community, communication, and collaboration. What’s so special about weblogs in community building?

Weblogs vs. A mailing-list is also a great place for community discussion, but flames and noise can be a problem. Spam is making less and less valuable. can complement weblogs  Blogging via  Mailing-list to weblog gateways  Comment notification via publishes to a select group, the content is free-form, haphazard, and unrestricted. The problem is that has little "memory" (you cant refer to a previous ) and no permanence (an doesn't park itself on your intranet, to be seen, shared, repurposed, etc.. for later use). -Jordan Frank, Traction Software

Weblogs vs. newsgroups Threaded newsgroups and web forums are a great place for community discussions, but flames and noise can drive people away. You can opt-out with a kill file. Weblogs provide an opt-in model – you only read, subscribe, and link to blogs you like. This also provides filtering. Forums can complement weblogs – a threaded forum could be used for weblog comments.

Weblogs vs. web pages Project and group web pages always seem to grow stale. Generally speaking, web pages are static and difficult to update. This is true even in a web savvy group with great web design/editing tools. Weblogs are easy to keep up to date and require no special publishing tools. Weblogs replace “homepages” The vanity page is dead; long live the Blog. The vanity Web page has lost momentum. People who posted one have already done so, and the growth has slowed. Most are uninteresting and uninspired. Cat pictures dominate too many of them. – John Dvorak

Weblogs vs. Wikis Wikis provide:  A collaborative space for a community  Anybody can edit or add any page via web interface  Super simple syntax means, no need for HTML Wikis can function as weblogs and can produce RSS feeds Wikis & weblogs are easily integrated

Weblog as community “it’s this multitude [of separate sites] that gives the weblog community model it’s strength. Because a person has control over his own piece of community landscape, he feels a powerful ownership of his space that’s lacking in traditional community sites.” Design For Community, Derek Powazek

Weblog Community Aggregators Javablogs.com is not the only one… “A Community Aggregator is a portal-like web application that displays weblog posts from a group of closely related but separately hosted weblogs and provides synthetic newsfeeds so that readers may subscribe to the group as a whole.” Enabled by RSS syndication Provide aggregated RSS feeds Subscription lists in OPML format

Planet Apache Community aggregator for Apache developer weblogs. Similar sites for:  Dot Net blogs  Python blogs  GNOME blogs  Mono blogs  Fedora blogs  Debian blogs  Lisp blogs  Etc. …

Question #1 Why have weblogs have become such an important part of the Java community?  Ease of publishing empowers developers to share  This resulted in lots of great developer weblogs  Weblogs are great for community building

5 – Weblogs at work More and more people are discovering weblogs and wikis are useful on the job and behind the firewall. Let’s talk about some specific uses for weblogs in the workplace.

K-logging K-logs: weblogs for knowledge management, a term originated by Jon Robb former CEO of UserLand. Every employee blogs on a daily basis  Goals and progress  Opinions and links to outside news and analysis Managers subscribe to employee weblogs, directors subscribe to their manager, and so on up the chain. Weblog archives act as knowledge base that may be commented upon and linked to.

It all sounds so good, but… Will it work? Local blogger Mark Pilgrim points out that:  “most people are not good writers”  “most companies don’t see the value of having people document anything”  “most people are not passionate about their work”  “people only have so much writing in them everyday”

Enterprise blogging use-cases Enterprise Weblogging vendor Traction software suggests a number of use cases for weblogs behind the firewall:  Personal notebook  Corporate communications  Program management  Product management  Operations log  Internal news  Communities of interest

Enterprise Blogging

In my experience… Weblogs are useful for timely news and status  Announce new builds and new documents  News of big changes to code-base  Weekly or daily status reports Wikis are useful as collaborative space  Serves as software project homepage  Record rough specs and feature ideas  Consultants can document progress and issues  Testers can document ever changing test setups

6 – Roller demo Making a post with Roller Making a post with w:bloggar Using Roller’s Wiki integration features Managing categories Managing bookmarks

7 – Roller Architecture Roller is an open source J2EE weblogging system that manages weblog data in a relational database.  Editor UI – Struts and JSP  Page and RSS rendering – Velocity  Database access – Hibernate (or Castor)

Layered architecture

7.1 Roller Persistence Layer

Persistence Layer in context

Example code: a query // Find all entries in a website since a given date QueryFactory factory = mStrategy.getQueryFactory(); Query query = factory.createQuery(WeblogEntryData.class.getName()); Condition specifiedWebsite = factory.createCondition("website", Query.EQ, website); Condition specifiedDate = factory.createCondition( “pubTime", Query.GT, date); List conditions = new LinkedList(); conditions.add(specifiedWebsite); conditions.add(specifiedDate); query.setWhere(factory.createCondition(Query.AND, conditions)); List entries = query.execute();

7.2 Roller Business Layer Defined by set of manager interfaces. And a set of persistent domain objects.

Business Layer in context

Roller Data Model

Example POJO: XDoclet markup /** name="website" table="website" id="id" * key-generator="UUID" auto-complete="true" table="website" include-all="true" */ public class WebsiteData extends org.roller.persistence.PersistentObject implements java.io.Serializable { /** set-method="setDescription" name="description" * dirty="check" sql-dirty="check" column="description" * non-null=“false" unique="false" */ public java.lang.String getDescription() { return this.description; } public void setDescription(java.lang.String description) { this.description = description; }

XDoclet code generation, part I XDoclet makes it easy to keep O/R mapping files in sync with Java source code.

7.3 Roller Presentation Layer Editor UI implemented with Struts and JSP, using Struts form beans generated by XDoclet. JSP pages use:  Struts HTML form tags  JSTL core and I18N tags  Custom Roller JSP tags Roller pages and RSS feeds are implemented using Velocity templates.

Presentation Layer in context

Example Action: XDoclet markup /** path="/BookmarkSave" name="bookmarkFormEx" * validate="true" input="/BookmarkEdit.do“ * name="Bookmarks" * path="/Bookmarks.do?method=selectFolder" */ public class BookmarkSave extends Action { public ActionForward execute( ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception {...

XDoclet code generation, part II XDoclet makes it easy to keep deployment descriptors in sync with Java source code.

7.4 Roller Page Rendering Weblog users want almost complete control over page layout and design For a variety of reasons, we can’t allow them to edit JSP files Instead, pages are defined by Velocity templates  PageServlet renders user-defined pages  FlavorServlet renders predefined formats

Example: a weblog page template #showWebsiteTitle() #includePage("_css") #showRSSAutodiscoveryLink() #showWebsiteTitle() #showWebsiteDescription() #showWeblogCategoryChooser() #showWeblogEntries("_day" 15) Calendar #showWeblogCalendar() RSS Feeds #showRSSBadge() #showRSSLinks() Links #showBookmarks("Blogroll" true false) #showBookmarks("News" true false) Navigation #showBasicNavBar(true) #showEditorNavBar(true) Referers #showReferers(30 20)

Example: a day page template #showDayPermalink( $day ) #showEntryDate( $day ) #foreach( $entry in $entries ) $entry.title #showEntryText($entry) ($entry.pubTime) #showEntryPermalink( $entry ) #showCommentsPageLink( $entry ) #end #showLinkbacks( $day )

Example: the RSS template $utilities.textToHTML($website.name,true) $websiteURL $utilities.textToHTML($website.description,true) en-us Copyright #formatDate("yyyy" $now) $ Address #set( $entries = $pageModel.getRecentWeblogEntriesArray($entryCount) ) #foreach( $entry in $entries ) $utilities.textToHTML($entry.title,true) $absBaseURL$entry.permaLink $entry.getRss09xDescription( $entryLength ) #end

Roller Page Velocity Servlets Page Servlet mapped to /page/ Flavor Servlet mapped to /flavor/ and to /rss/

7.7 Roller: Lessons Learned Initially, FreeRoller suffered from severe performance and load-related stability problems. Now, JRoller runs smoothly and puts minimal load on the Java Lobby server. Most important performance improvements  Caching, Caching, and more Caching  Proper use of connections - Open Session in View  Database Indexes

Caching, Caching, Caching Server-side Page and RSS feed caching via OSCache Enable client-side caching by supporting HTTP IF- MODIFIED-SINCE header. Cache last update time for each weblog so checking IF- MODIFIED-SINCE needs no database query. Caching keeps database hits to absolute minimum.

Example: RSS feed caching

Open Session in View Cannot give each HTTP session it’s own database connection – that won’t scale. Pattern documented by Hibernate folks, a “persistence session” corresponds to a database connection. Each incoming request gets a connection from the connection pool and uses it for all processing. When response is complete, request’s connection is returned to the pool.

Open Session in View - sequence

Database indexes Biggest single performance improvement. Watch for queries that examine lots of rows, make sure key fields are indexed.

8 – Conclusion Go sign up for your new blog at JRoller.com Thanks for listening! Any questions?