Node.js First Look
Illustration by Richard Downs

Creating a Joomla! chatroom front-end


From:

Node.js First Look

with Joseph LeBlanc

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Video: Creating a Joomla! chatroom front-end

Adding a Node-based chat room for Joomla! involves two main pieces; the front-end and the back-end. Let's add the front-end for the chat room now using the code from the previous chapter. We're going to add the code for the chat room directly to this Joomla! template. A more permanent solution would be to build a module or a component for Joomla! You can learn how to do this in other lynda.com online training library titles. For now though, we're going to add the code directly to the template. So let's go there now. I'm using XAMPP, so I'm going to go to XAMPP > htdocs > joomla > templates > beez_20, and then javascript.
Expand all | Collapse all
  1. 2m 40s
    1. Welcome
      37s
    2. What you need to know
      49s
    3. Using the exercise files
      1m 14s
  2. 11m 3s
    1. Understanding Node
      1m 21s
    2. Choosing an installation process
      1m 9s
    3. Installing Node on a Mac
      1m 43s
    4. Installing Node on a PC
      1m 42s
    5. Installing Node through a package manager
      1m 59s
    6. Compiling Node from source code
      3m 9s
  3. 9m 20s
    1. Running a Node script
      2m 6s
    2. Using the Read-Eval-Print-Loop (REPL) interface
      4m 49s
    3. Restarting scripts automatically
      2m 25s
  4. 10m 35s
    1. Understanding modules
      3m 39s
    2. Finding modules
      1m 59s
    3. Using modules
      2m 44s
    4. Maintaining modules
      2m 13s
  5. 9m 41s
    1. Reading arguments
      2m 34s
    2. Gathering user input
      1m 56s
    3. Selecting through browserless jQuery
      2m 36s
    4. Validating JavaScript code
      2m 35s
  6. 13m 55s
    1. Responding to requests
      4m 18s
    2. Using Connect
      3m 22s
    3. Reading request data
      2m 44s
    4. Sending different response types
      3m 31s
  7. 26m 56s
    1. Starting an Express project
      2m 58s
    2. Laying out views
      4m 47s
    3. Listing records
      3m 15s
    4. Filtering data
      3m 43s
    5. Getting organized
      2m 34s
    6. Posting data
      3m 36s
    7. Generating Express sites
      6m 3s
  8. 21m 23s
    1. What are WebSockets?
      2m 27s
    2. Installing Socket.IO
      3m 14s
    3. Emitting and receiving events
      2m 36s
    4. Communicating with individual sockets
      2m 17s
    5. Messaging across sockets
      2m 3s
    6. Implementing chat interfaces
      2m 56s
    7. Handling event types
      2m 10s
    8. Reusing chatrooms
      3m 40s
  9. 20m 0s
    1. Exploring integration options
      2m 4s
    2. Creating a WordPress chatroom front-end
      2m 29s
    3. Creating a WordPress chatroom back-end
      4m 6s
    4. Creating a Drupal chatroom front-end
      2m 18s
    5. Creating a Drupal chatroom back-end
      3m 20s
    6. Creating a Joomla! chatroom front-end
      2m 38s
    7. Creating a Joomla! chatroom back-end
      3m 5s
  10. 4m 52s
    1. Hosting Node projects
      3m 29s
    2. Next steps
      1m 23s

please wait ...
Watch the Online Video Course Node.js First Look
2h 10m Beginner Aug 14, 2012

Viewers: in countries Watching now:

JavaScript isn't just for special effects and form validations anymore; Node.js makes it possible to write full web applications entirely in JavaScript. In this course, author Joseph LeBlanc guides you through installing Node.js for the first time, as well as installing Node modules through NPM and writing command-line scripts. The course also covers creating servers, using Node-based frameworks, building templated markup, integrating Node with legacy codebases, programming for WebSockets using the Socket.IO module, and much more.

Topics include:
  • Using the Socket.IO Node package to achieve "live" effects like Facebook notifications
  • Templating your markup in the back end using popular JavaScript libraries
  • Scraping web sites using jQuery without a browser
  • Validating your JavaScript code before running it
Subject:
Developer
Software:
Node.js
Author:
Joseph LeBlanc

Creating a Joomla! chatroom front-end

Adding a Node-based chat room for Joomla! involves two main pieces; the front-end and the back-end. Let's add the front-end for the chat room now using the code from the previous chapter. We're going to add the code for the chat room directly to this Joomla! template. A more permanent solution would be to build a module or a component for Joomla! You can learn how to do this in other lynda.com online training library titles. For now though, we're going to add the code directly to the template. So let's go there now. I'm using XAMPP, so I'm going to go to XAMPP > htdocs > joomla > templates > beez_20, and then javascript.

Joomla! 2.5 does not have jQuery, so we're going to add it. Next, open index.php, scroll down to the tag jdoc:include type = "head". We're going to begin adding JavaScript and CSS right here. Open up index.html from the exercise files. First, we're going to add the script tag that loads the Socket.io library.

Next, we're going to load jQuery. We need to fix the path to jQuery so that it points to the JavaScript folder. Now that we've loaded jQuery, let's add the jQuery based script that runs our chat room. We'll need to make one small adjustment to this before we continue, because Joomla! 2.5 does not have jQuery and ships with new tools, we need to send jQuery into No Conflict mode.

To do this type jQuery.noConflict. Now let's copy the CSS. Finally, let's copy in the markup, grab the div for the chat room, as well the input for the chat messages, then scroll down and find the div with id of main. Paste the markup directly inside the div with id of main.

Now let's go back to Joomla! and hit Refresh. You'll notice we have the chat box here, but it currently doesn't work, that's because we still need to set up the server to talk to Joomla! We'll be doing that in the next video. Now that we have the front-end for the chat room in place, we'll be able to concentrate on getting Node and Joomla! to work together in the back-end.

Find answers to the most frequently asked questions about Node.js First Look .


Expand all | Collapse all
please wait ...
Q: Does the instruction from "Selecting through browserless jQuery" work for Windows users?
A: The “Selecting through browserless jQuery” video does not work on Windows
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

* Estimated file size

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Node.js First Look.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.