Archive | JavaScript

Better as ECMAScript, the client-side runtime engine of the world’s browsers.

NH Ruby September 2011: Backbone.js Jason Morrison

Twelve folks attended the September meeting of the New Hampshire Ruby Rails Group. Due to some logistical issues, we moved the meeting from NH-ICC to AlphaLoft, thanks to AlphaLoft member Nick Plante. Jason Morrison of thoughtbot was the featured speaker, talking about backbone.js.

Organizer Brian Turnbull got the meeting started with brief introductions.

Clients want the improved client-side experience of rich-client apps within the browser.

But which framework? Different patterns: MVC2 is what we’re used to seeing in Ruby/Rails. MVC and MVVM (Model-View-View-Model or Presenter).

Choice fatigue (http://www.nytimes.com/2011/08/21/magazine/do-you-suffer-from-decision-fatigue.html) : there seem to be more JavaScript frameworks than JS developers.

  • Capuccino – PowerPoint in the browsers, 270North
  • SproutCore (1,x,m 2.z) ricu Ui widget framework,.0 from the ground up rewrite, less widgets
  • Knockout.js: useds the HTML5 Data- elements
  • Batman.js – from Shopify, ActiveMerchant, using Node.js server-side component
  • JavaScriptMVC – mature, uses jQuery, filterable grids, lots of power
  • Spine.js – CoffeeScript, asynchronous front end, does full validation on client-side
  • Backbone.js – tonight’s featured framework, well-documented (in Doc-O)
  • Angular, Coherent, PureMVC-js, AFrameJS, TrimPath Junction,

Moving parts:

  • History
  • Router
  • View
  • Model
  • Collection
  • Sync
  • Underscore
  • $

Jason wowed the crowd with an excellent demo of an app under development and spoke eloquently of the power, and the dangers, of deploying MVC (or MV-something-else) into the client. His slides contained a great many good references. My laptop gave out at this point, so I didn’t take additional notes, but you can find his slides at http://jayunit.net/backbone-js-on-rails-talk and source for the slides at https://github.com/jasonm/backbone-js-on-rails-talk/blob/gh-pages/slides/index.md

One of the little things that got the crowd all excited was the line numbering on Jason’s Vim session: the current line was numbered 0, and line numbers incremented both up and down the screen. “Oh, that” Jason said. ‘set rnu’ is the command (see :help rnu within vim for details.)

Michael Tomer talked a little bit about his project, rocket.io, which is an interesting project trying to solve similar problems: “real-time” (no http lag) page updating, background sync between client and remote server. You can find his work at [updated link] https://github.com/actsasbuffoon/rocket-io

Thanks to Jason for an awesome presentation, to Nick Plante for hosting us at AlphaLoft, to Brian Turnbull for organizing the meeting, announcements and logistics, and to all the attendees for their participation.

NH Ruby meeting, 15 August 2011: Brian Turnbull, Rails 3

Brian Turnbull ran and presented to the August meeting of the New Hampshire Ruby Users Group meeting, held at the New Hampshire Innovation Commercialization Center. Over a dozen attendees turned out for the meeting, despite the inclement weather.

Brian presented an introduction to Rails 3 using a small application he had built for  work. He gave us an overview of the problem to be solved, skipping the irrelevant details, and explained how that fit into basic MVC concepts. We touched on the idea of design patterns. We examined or discussed many facets of Rails development, including rake tasks, migrations, fat models – thin controllers, using HAML for view templating, creating your own custom validators, deployment using Capistrano and more.

Brian mentioned several useful resources, such as Google, the Rails Guides, the API reference,  and more. He mentioned that he’d read Metaprogramming Ruby [Updated link] and thought that it changed his perspective on using Ruby.

As always, there was time for folks to get their questions answered. There were questions on stack dumps in rake, unobtrusive JavaScript, new features of Rails 3, Capistrano deploys to non-git-clients, and more.

Thanks to Brian for a information-packed presentation, and to all for attending and participating. Brian is always looking for ideas for future meetings and volunteer help in organizing.

 

Seacoast WordPress Developers Group, April Notes

On April 6th, the Seacoast WordPress Developer’s Group met at the New Hampshire Innovation Commercialization Center to talk WordPress. Networking and casual conversation started around 6:30, with the meeting formally starting at 7 PM with a round of introductions:

Dave – former Cold Fusion, ETL, new to WordPress,
Carl Eric Johnson – web developer, WordPress instructor and eveloper, fan of Thesis framework.
Amanda – BIL doing Joomla, Drupal, and WordPress
Sharon, Rye Public Library, Technology Coordinator, just launched a freshened site on April 1st using WordPress and Atahualpa theme/framework.
Will, a graphic designer in a print shop who’d been encouraged to learn web design and now WordPress.

Book recommendations:
Amanda praised the Wrox Professional WordPress book.
Carl Eric has enjoyed WordPress: Visual QuickStart Guide [Updated link — ed.] to get up and running, and WordPress Bible(Aaron Barzell) from Wiley as a reference.

Main Presentation: Carl Eric Johnson: talk about themes and frameworks
Sitepoint.com Wicked WordPress Themes book has free sample download chapter. Table of contents points out the choices of custom themes, child themes, building a framework.
Child themes: load with parent’s theme files, in your child file, you import the parent, then override what’s different.
In WordPress 3.0, theme TwentyTen has a lot of options built in. Thesis and Atahualpa have a number of pages of options: sizing, features, colors, styles, etc.

Amanda talked about file structures and “the loop” – directories of wp-admin and wp-install are pretty much off-limits, containing the installed WordPress files and overwritten up updates; wp-content contains most everything else, including the stuff you customize. Add your own functions.php and copy the functions you want to override. A theme consists of index.php and style.css as a minimum; you can add as much as you want from there. See the Codex for the hierarchy of theme files WordPress looks for in order to render your content. Consider starting with a “blank” theme if you’re building your own, such as Starkers or Boilerplate themes – essentially stripped-down skeletal themes with all of the style removed.

See http://codex.wordpress.org/Template_Hierarchy for a description of how WordPress selects the correct template(s).

See http://codex.wordpress.org/The_Loop_in_Action for an overview of the loop.

Seacoast WordPress Developers meeting, 2-March-2011

Five people attended the March meeting of the Seacoast WordPress Developer‘s meetup, held at the New Hampshire innovation Commercialization Center near Pease in Portsmouth. We did a round of introductions and welcomed two new members and discussed what the group could focus on. We discussed the boundaries of CMS and Blogging and Wikis and how they overlap (A professional in education provided us with some great insights on how we think about some of these items), the challenge in finding consultants and clients, and how we can build up a network. We talked about potential agenda items: what should we schedule, what should we have in free-form.
I think an FAQ we ought to be prepared to answer is “What is it that WordPress is?” It’s less than obvious. “A blog” is the wrong answer, as that is a form of document, and not an application. “A CMS” is such a vaguely defined answer that it’s not much more useful than “an application.”

Other questions we started to explore, and possible future topics:

  • What is it that others are looking for on the web?
  • Good resources for learning WordPress: Codex, FAQ, books, etc.
  • WordPress SEO
  • WordPress Security
  • Loop/structure of databases tables, templates
  • Popular plugins
  • WordPress Backup tips: data and files
  • WordPress Community

Finally, Amanda presented her talk on building a plugin. She’d done some excellent research and used clear examples and explained them well. Here are the notes and slides posted to the new Seacoast WordPress Developer’s website, running WordPress, of course, and BuddyPress.

So, it was a great second meeting of the Seacoast WordPress Developer’s group. Stay tuned for more news. Thanks to Amanda for organizing the event, and to the New Hampshire Innovation Commercialization Center for providing the great facilities!

Seacoast WordPress Developers Group announce March meeting

Organizer Amanda Giles announced a second meeting of the Seacoast WordPress Developers Group:

When: Wednesday, March 2, 2011 7:00 PM
Where: NH-Innovation Commercialization Center, 75 Rochester Avenue, Portsmouth, NH 03801
Why: Let’s get together for another meetup. More details coming soon. Please send me your suggestions or ideas for things you would like to share or see shared.

CMS Learning Curves, artist unknown

CMS Learning Curves

Notes from Ruby SIG, 16-Aug-2010

The New Hampshire Ruby/Rails group met as usual on the 3rd Monday of the month. We met at the New Hampshire Innovation Commercialization Center, a new space near the Pease airfield. Mark Galvin, NHICC’s Managing Director, was kind enough to offer the space for our meeting and tell us about the ICC. Eleven members attended the meeting.

As we often do, we started with a round of introductions. It’s always interesting to find out who’s there and what they’re up to. I mentioned the GNHLUG calendar and Nick plugged the upcoming Ruby Rampage. Near the end of the meeting, we plugged the NorthEast RailsCamp, coming up on it’s third meeting, this one in Stowe, VT. 5 alums from previous camps were there, and all loved it. There may still be a ticket or two left, even though the site says zero – you’d better hurry!

We were lucky enough to have two presentations tonight.

Brian Turnbull presented “Interfacing Ruby with C.” He explained he needed to do some automation with a “black box” his company was using, and their documentation consisted of a C API and a DLL. Rather than developing an entire application in C, he used Ruby to interface to the C API and then could develop an easy-to-modify Ruby app. That turned out to be a good idea, as the final product he delivered turned out to be very different from the initial request, and having the ability to rapidly re-develop in Ruby was a success. To show us how to use C to access Ruby and vice-versa, Brian used a simple example of a “leaky bucket stack,” a fixed-length stack that would lose the oldest item as the stack was pushed. It was a great example in that it had enough complex behavior to be useful, while simple enough to explain and translate into C without too much effort. First, we reviewed the pure Ruby implementation. Brian proceeded to build up the equivalent code in C, calling Ruby array functionality and data types where appropriate. He then showed how to configure the C extension from from Ruby, build, compile, debug and run from the ruby command line.

See the example code and slides (I’ll update the URL when available). Also http://github.com/bturnbull/padpaws for his more advanced C example.

Brian Cardarella, @bcardarella, http://bcardarella.com, presented his gem, client-side validation, which he developed while working on the “Raise Your Vote” site for the Democratic National Committee. The Raise Your Vote site is intended to assist in voter registration by collecting data online and generating matching PDFs of the voter application. Naturally, 50 states have fifty different forms, with different requirements. He wanted to avoid duplicating the server-side validations with hand-maintained client side code, as the regular changing of requirements and the difficulty of keeping business rules in synch across the two languages would doom the project. He wrote client-cisde_validations to use the declarative validations within the entity models to generate the equivalent Javascript code. Client-side_validations has remarkable depth and breadth, handling nearly all of the common and exceptional types of valiation (Brian notes the few difficult cases in his slides). You can find the code on GitHub (gem code, examples) and the slides here: client_side_validations.pdf

Thanks to Brian Cardarella for travelling all the way to Portsmouth and thanks to both Brians for their fine presentations. Thanks to Nick Plante and Brian Turnbull for organizing and promoting the meeting and the group. And thanks to Mark Galvin and the New Hampshire Innovation Commercialization Center for providing the fine facilities!

Visibone, a source of great reference guides and online utilities

Visibone's Everything Book
One of my favorite tools for the past couple of years has been a web developer’s reference guide from Visibone. The book has rarely left my desk, within arm’s reach, to help out when I just can’t remember all the options for an HTML tag or a CSS style. While there are some great online references, having it all in a couple sheets of paper makes it easy to find what I’m looking for (especially if I couldn’t remember if it was text-something or font-mumble) and the reference has also let me browse around the dusty corners and learn something I didn’t know.

Recently, I did some web development using XHTML 1.1 and CSS 2.1 and realized my 2004 version of the guide was getting out of date. I was pleased to see many of the pages had been updated to a 2009 version. After reviewing the many options, I chose to go all in and bought the Everything Book, a step up from my earlier version. This one includes cheatsheets for PHP, MySQL, JavaScript, DOM, HTML, CSS, HTML special characters, web colors and a great index. The reference not only includes broad coverage of each topic but many side notes and compatibility guides (for CSS, the IE-Netscape-Opera-FireFox-Safari compatibility color coding is tremendously useful!)

There are a number of bonus references available on the Visibone site at no cost. Check out the color lab, the color swatches for many of the common graphics programs, the online color codes reference, and excerpts from all of the various reference materials. In addition to reference book, Visibone offers posters, charts and mouse pads. The web site is worth a visit; it’s charmingly quirky, retro, opinionated and clearly individualistic.

Notes from Python Special Interest Group, 20-Nov-2009

Eight people attended the Python Special Interest Group, held a week early to avoid the Thanksgiving holiday. Anticipate a reschedule December meeting as well.

Last night’s meeting was a vigorous and far-reaching discussion of MySQL, Oracle, the future of MySQL, Maria DB, OpenOffice.org automation using Python, OpenOffice.org automation using Visual FoxPro, Twisted, IE6, Zope, Plone, Django, MS SQL Server, pyodbc, SQLAlchemy, Cascading Style Sheets, IE6, FireFox and FireBug, User Agents, IE6, how not to insulate a bungalow roof, the (Python!) cssparse module (http://cthedot.de/cssutils/), Fortune’s selection of Steve Jobs as “CEO  of the Decade”, Lenovo netbooks and Ubuntu, the Millennium, why calendar years are one-based and not zero-based, distributed version control systems, master-slave and master-master replication using MySQL and Postgres, svn and git, and more! Whew! You should have been there!

Thanks to Bill for organizing the meeting, to all for attending and participating, and to the Amoskeag Business Incubator for providing the great facilities!

Stay tuned for an announcement of the December meeting, and hope everyone has a good Thanksgiving!

Notes from New Hampshire Ruby User Group, 25 June 2009: Pat Allen, Thinking Sphinx and Casey Rosenthal SASSiJS

Twelve people attended the June meeting of the New Hampshire Ruby / Rails User Group , held on the 4th Thursday of the month ( we usually meet on the 3rd Thursday) at RMC Research in Portsmouth (Thanks to RMC and to John for hosting the meeting!)

Nick Plante was our master of ceremonies. As is the custom, we made a round of introductions to find out the most of the folks were “from away.”

Pat Allen put on the first presentation, on Thinking Sphinx. Thinking Sphinx is a Ruby library (not just for Rails) that allows Ruby applications to work with the Sphinx full-text search engine. Pat presented a slightly shortened version of the presentation he gave at RailsConf, and the presentation was clear, engaging and interesting. Participants had lots of questions to ask on search technology, word stemming, project status, what it’s like to be a Freelancing God, what being the lead on a popular Open Source project is like, what’s a kilometer, and more, and Pat’s answers were insightful. Check out (pun intended) the source on github, the support on Google Groups and Pat’s guide to using Thinking Sphinx on Peepcode.

Pat also took a moment out to plug his upcoming Rails Camp, a not-going-to-make-a-profit weekend get-together in BarCamp/Unconference format for 30-ish people at Bryant Pond, Maine. It sounds like a great event and a nice location and a price that can’t be beat: $120 for 3-nights, 3-days food, lodging and conference. Get details and consider signing up at http://railscamps.com/#ne_july_2009

Casey Rosenthal asked us, “What are style sheets for?” a number of times during his presentation, for good reason. Casey talked about SASS, Syntactically Awesome Style Sheets, a part of HAML and his reimplementation of SASS in Javascript, SASSiJS, sounds like “sausages” leading to all kinds of predictable jokes. But the topic was thoughtful, intriguing, interesting, and controversial. SASSiJS actually allows a .sass file to be downloaded as part of the HTML file, with similar syntax to a stylesheet link, and a JavaScript file that interprets the .sass file into CSS and applies it to the HTML document. Discussion was far-ranging and insightful: “What’s this good for?” “Would designers use this to make their CSS DRY?” View the source on GitHub at http://github.com/clr/sassijs/tree/master.

Thanks to Pat and Casey for their great presentations, to Nick for organizing, and to John and RMC for the facilities.

LUG Happenings, June 2009

There’s a couple more LUG meetings this month.

The Monadnock Linux User Group, MonadLUG, will be back at their usual location this Thursday, June 11th, and will feature Ed Lawson talking about Scribus, the desktop publishing software. I’ve used Scribus to create newsletters, posters and banners, and recommend it. Ed puts on a good presentation, too! You’ll find directions to the meeting here.

The NH Ruby / Rails group meets on the fourth Thursday of the month, June 25th, and will have two awesome presentations: Pat Allan will talk about Sphinx, and Casey Rosenthal will speak on SASSIJS. Details here. It promises to be a great meeting!

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.