SOTR2010 Day 2 notes

Scotch On The Rocks 2010

Scotch On The Rocks 2010

Here’s my second day of notes from SOTR2010.  Again, keep in mind that I focused on what caught my interest ;)

Sessions

ColdBox Platform 3.0.0 : Developing Sustainable ColdFusion Applications (Luis Majano)

  • General Information
    • Has been developed since July 2006, 18 releases.
    • Based on conventions.
    • Modular, can be simple or complex depending on needs.
    • MVC.
    • SES URLs and Rest.
    • Caching, Dependency Injection.
    • Plugins, deployment, flex/remote support.
    • Security.
    • Documentation is thorough and a book is available.
    • Everything is done with simple CFC’s.
      • New event, new function, simples.
    • Event driven.
  • Eclipse plugins for ColdBox.
    • Application Skeletons.
    • Code Generation.
    • Integration tests generation.
    • Live API.
    • Search docs.
    • Auto-Update.
    • Loads of code snippets.
    • Code insight.
  • Testing support
    • Built with Unit / Integration testing in mind.
    • Can simulate queries to avoid hitting the database during testing.
    • Module testing will be available in 3.0.0.
  • Debugging tools
    • Debugger can be customized.
    • Profiles requests.
    • Profiles Flex/Air/Remote.
    • Monitors caching, remote calls, modules.
    • LogBox Integration.
  • Routing and Rendering
    • Data marshalling for multiple output formats.
    • event.renderData(type=’json’, data=qRecords)
    • SES, Restful requests support
  • Modules
    • Build an application for ColdBox like normal, add a special CFC and it’s a module.
    • Modules can be dropped into other applications.
    • API support for loading, reloading and unloading modules.
  • LogBox
    • Can be used independently from ColdBox.
    • Provides a very flexible and well written logging platform.
  • MockBox
    • Can be used independently from ColdBox.
    • MXUnit compatible.
    • Mock methods and properties.
    • Debug counters.
    • Track method calls.
    • Object stubs.
  • Caching
    • Can be used independently from ColdBox.
    • Easily configurable.
    • Memory aware, stops itself from gobbling up all available memory.
    • Monitor and console available.
    • Event model for reacting to usage with certain tasks.
    • Multi-Threaded.
    • ColdBox
      • Cache data, events, views.
      • Event caching uses some extra attributes to the cffunction tag.
      • View caching easily set with parameters for event.setView / renderView.
  • WireBox
    • Dependency Injection / AOP.
    • More flexible that ColdSpring.
    • Manages almost anything you can throw at it.
    • Standalone.

Luis certainly knows what he’s doing when it comes to presentations.  I’m sold!  Where do I sign up?  It’s a shame I couldn’t go to his ColdBox training sessions that were taking place after SOTR2010 as I’m certainly digging the ColdBox.  One thing I’d really like to see at SOTR2011 would be Luis possibly showing how to turn legacy applications into ColdBox ones ;)

Intro to CF 9 Server Manager – Cluster and Manage CF (Claude Englebert)

Unfortunately due to problems with Internet access, Claude had to change the focus of the presentation.  He ended up walking us through an CF9 Enterprise multi-server installation and configuration, plus some other related topics.

  • CF9 Enterprise
    • Always install in multi-server mode, you’ll be better off in the long run.
    • Walked us all through the installation.
    • CFAdmin access should be restricted to localhost or a set of IP addresses via the jrun.xml file (interface attribute).
    • Clustering is recommended
      • High availability.
      • Better resource usage.
    • Different methods for clustering available.
      • Sticky sessions.
      • Avoid session replication.
      • Use java sessions.
    • Web Server configuration tool can be used to hook websites to instances / clusters.
  • Server Manager
    • CF9+ servers only.
    • You can see a summary status of your servers.
    • Can easily compare / sync settings between servers.
    • Apply hotfixes remotely.
    • AIR based.
  • Admin API
    • A bunch of CFCs are available in the installation.
    • CFCs provide access to all the admin tasks normally performed through CFIDE/Administrator.
    • Hardly any documentation available, useful information can be seen by surfing to the CFC.
    • Could be useful for application installation wizards where it could set up the datasources for you.
  • Extending the ColdFusion Admin.
    • Edit the file extensionscustom.xml.
    • Some extensions are available on RIAForge.
    • Can easily include the standard header / footer.
  • ColdFusionBox
    • AIR based application.
    • Keeps you up to date with what’s going on in EMEA (Europe, Middle East and Africa).

I actually found this pretty useful and want to thank Claude for putting together the presentation after the Internet access issues.  One thing that did catch my eye was the ability to extend the CFAdmin.  I’m sure I’ve heard about it before but it was great to see an example and has got me thinking about what would be useful to have in the admin that isn’t already there.

SQL to HQL (John Whish)

  • HQL – Hibernate Query Language.
  • Supported in ColdFusion and Railo.
  • You can use simple looking CFC’s to associate with a table and even create it if it doesn’t exist.
  • Good idea for common development as it standardises the approach used.
  • Hibernate is mature, thoroughly tested, database agnostic and fast.
  • ORMExecuteQuery(HQL)
  • If you want your results like CFQuery, use EntityToQuery().
  • Turned on using a setting in the application.cfc.
  • Entity names in HQL are case sensitive.
  • SELECT is optional.  If you use it and specify fields you’ll get an array of arrays back instead of an array of objects.
  • Use parameters! HQL can still be attacked using SQL injection.  Named parameters is probably the best method.
  • Behaviour should be located in the CFC’s not the database.
  • Performance should be too much of an issue.

Considering this was the first time John had tried his hand at presenting, I thought he did a great job.  Nerves didn’t seem to be an issue, or he hid them quite well.  The only thing I’d change is the amount of examples.  I liked the ones that showed possible pitfalls and errors you might encounter but some of the other examples could do with either being trimmed or prehaps skipping the output of it.  Otherwise I found it really useful and it was a shame that we ran out of time with all the questions people had for John.

Cloudy with a chance of Caching and Clustering (Mark Drew)

  • Started off with an example site.
  • The site suddenly gets popular and now our application and server are finding it difficult to cope.
  • Caching
    • Started with query caching.
    • Showed how it works in Railo with ehCache.
    • Why use ehCache?  Because it’s distributed!
  • Clustering
    • Three instances are clustered together.
    • An extension is used to maintain settings between each instance (datasources in this example).
    • The cache settings also get shared.
    • Now when one instance caches, the other instances can see that cache instead of caching themselves.
    • You can have multiple caches

Short on notes for this one due to the “Cloud” orientated bits not being an option at all for where I work.  Apart from that Mark put on a great show as always.  I was ready for the sweet throwing as I was at the FuzzyOrange table when he was stocking up on ammo ;)

Productive Work Environment / Practices (Peter Bell)

  • Focused mainly on the Pomodoro technique for managing work time.
  • Suggestions to help increase productivity:
    • Learn keyboard shortcuts.  They are often faster than using the mouse to navigate via menus.
    • Use launchers are command line access is again faster than using the mouse at times (e.g. Launchy).
    • Try using multiple clipboards (e.g. CLCL).
    • Create batch files for repetitive tasks.
    • Try out keyboard / mouse macro tools (e.g. autohotkey).
  • Mentioned the following books.
  • Try and give yourself attainable goals.
  • Focus on direct and immediate feedback.
  • Completed goals will help give you a sense of achievement.
  • Pomodoro
    • A Pom is..
      • Work for 25 minutes.
      • 5 minute break.
    • Pomodoro cycle
      • After every 4 Poms, take a longer 15-30 minute break.
    • Requirements
      • Timer.
      • To do list, so you know what work needs to be done.
      • Activity sheet, to see what you achieved in that pom.
    • If you break a pom, start again.
    • Break tasks down so they’re not less than 1 pom and no more than 5-7 poms.
    • Avoid interruptions as much as possible
      • Emails, IM’s and others can be distracting.
      • Redirect phone if possible during pom, unless it’s part of a task.
      • Set a “quiet time” where people know that you won’t be available.
    • Benefits included being more productive and focused, easily attained goals, sense of achievement and better estimation of tasks in poms.
  • Review operational processes to eliminate waste.
    • Find out how long common tasks take and why.
    • Eliminate the problem causing the delay or reduce as much as possible.
  • Testing
    • Regression testing is a must.
    • Why test manually everything to do with each change when you can automate it.
    • Reduces the risk of changes breaking code elsewhere.
    • Saves time.
    • Tests using Selenium can be easily written but non-developers.
  • Script repetitive tasks (ant, batches, command line Railo).
  • Make sure you track the time you take on tasks.
    • Improves estimates.
    • Easily see how much time you’ve spent working on projects.

Wow.  I’ve never seen Peter Bell present before and was really impressed.  He really does put a great amount of effort into expressing everything and giving you the feeling that what he’s talking about is important.  The content was very interesting and while I don’t think I’ll be able to manage working to Poms in my workplace, I will certainly attempt to take on board all his other advice.  I’m still curious why the presentation wasn’t split into 2 Poms thought… ;)

Applying Twitter’s API “Best Practices” In A ColdFusion Application (Ben Nadel)

  • Based around investigates into Twitters API, Restful services and other best practices.
  • Suggested that CFM files can be easier to create API’s with than CFCs.
  • CRUD operations can be easily associated with the requests HTTP verb.
    • Create = PUT
    • Read = GET
    • Update = POST
    • Delete = DELETE
  • While possible using JavaScript for Ajax requests, normal browser requests would need the ability to specify the action in the URL.
  • Make sure you have authentication support for your API, helps limit the request rate.
  • API’s should be as simple as possible.  Removing the file extension using URL rewriting is a good idea.
  • Support several output formats.  If the extension has been removed, this can be easily supported by having extensions like .json, .xml etc…
  • Return use response headers.
    • Provides any clients with additional information such as:
      • Rate limits.
      • Current number of requests.
      • Number of requests left before rate limit is hit.
    • Use the X-header-name format to specify them.
  • Return meaningful status codes and responses
    • If a record wasn’t found, return 404 with content containing a message.
    • There are numerous status codes that should be used under the different circumstances.
  • Code Demo
  • Ben’s code used a CfTry tag and several CfThrows / CfCatch’s to handling all the different outcomes.
    • Avoided the need for nested / several “if” statements.
    • Easily throw custom errors and handle them correctly.  API user always gets the correct status code + content.

Ben strikes again.  I really enjoyed his presentation and as usual you got the feeling that he’d focused on the subject intently, digging into every corner, before putting everything together and explaining it in simple practical ways that are easily taken in.  The dreaded faulty microphone did get the better of Ben a few times but he shouldn’t have worried, all the other sessions down there had the same random buzzyness happening.  Good work Ben :)

Day 2 thoughts

I really enjoyed the second day, especially starting off with ColdBox.  It felt well balance with the first day and at least down stairs was warmer than day 1.  Ben Nadel also spotted me and grabbed a photo which was great, found it difficult to say hello as he was pretty popular with someone always chatting with him.  I’m gutted I didn’t get chance to speak with Ray Camden, especially since he owes me a joke ;)

SOTR2010

All in all a fantastic event.  I think the FuzzyOrange team did a great job of organising everything and I’m completely shocked at how prepped they are for the next couple of years!  I glad I could make it to both days and will be trying my best to get to SOTR2011 :)

About misterdai
Web Developer, ColdFusion, PHP, XBox360 Gamer and Lost fan from Wales

7 Responses to SOTR2010 Day 2 notes

  1. misterbulletpoints, thanks for the recap! I actually already forgot about some of the points :-/
    Totally agree on John’s HQL presentation techniques btw.
    Cheers, Paul

    • misterdai says:

      lol, you should have seen the unbulleted mess that my actual notebook was like. Maybe I should get a netbook and type it instead next time.

    • John Whish says:

      Ah well – I tried my best! I thought I’d rip through the simple examples and then have more time to focus more time on the cool stuff at the end. I hadn’t anticipated that I’d get asked questions. Thanks for the feedback and I hope you learnt something (and I was nervous!)

      • misterdai says:

        I thought you did really well, just the questions managed to slow you down so you had to rush it at the end. The shadow puppet technique was a refreshing change from little red laser dots. I thought you kept your examples brilliantly simple and clear though, as you could easily see what was going on :)

      • And I guess I was asking most questions ;-P You did really well John!
        HQL is now high on my todo list btw, just after “getting to know CF Builder” and “learn Coldbox”. No kidding, that’s my actual todo :-)

  2. Ben Nadel says:

    Heck yeah I grabbed a photo – you’re David Boyer ;) Sorry we didn’t get to talk more.

    • misterdai says:

      ;) Can’t wait to see your phtoto’s from SOTR2010 when their up, be cool to see who else you Nadel’ed.

      Would have been nice to have had a better chat, not your fault though. Hopefully I’ll see you at SOTR2011 ;)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.