Login   Register  
Icontem

SiteApps, Selenium 2, Node.js on Windows, JSMad and PDFKit - Lately in JavaScript podcast episode 9 - JS Classes blog

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Blog JS Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog SiteApps, Selenium 2,...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  
<< Previous: Google+ to Embed 3rd ...>> Next: JSClasses site 1st An...

Author: Manuel Lemos

Posted on:

Categories: Site features, Lately in JavaScript podcast

On the Lately in JavaScript podcast episode 9, Manuel Lemos and Michael Kimsal have as guest Arturs Sosins, a top contributor of many interesting JavaScript objects in the JSClasses site, to discuss some of the most interesting news of in the JavaScript world.

They cover SiteApps, a marketplace of JavaScript Web applications, Selenium testing framework version 2 release, the new Node.js version now also available on Windows, JSMad JavaScript MP3 decoding library and PDFKit library for generating PDF documents using Node.js.

Listen to the podcast or read the transcript now.





Contents

Listen or download the podcast, RSS feed

Read the podcast transcript


Click on the Play button to listen now.


Download Size: 30MB Listeners: 1086

Introduction music: Riviera by Ernani Joppert, São Paulo, Brazil

View Podcast in iTunes

RSS 2.0 feed compliant with iTunes:

http://www.jsclasses.org/blog/category/podcast/post/latest.rss

Show notes

Contents

Introduction (00:20)

Interview with Arturs Sosins a Top Contributor of the JSClasses and PHPClasses site (1:00)

SiteApps - JavaScript Web Applications Marketplace (14:54)

Selenium 2.0 Released (19:17)

Node.js on Windows (25:23)

JSMad - JavaScript MP3 decoding library (35:20)

PDF generation with PDFKit (42:55)

Latest JavaScript objects published in the JSClasses site (46:11)

Importing JavaScript packages from SubVersion or CVS repositories (58:37)

Contributing articles to the JSMag magazine (1:01:49)

Conclusion (1:04:14)

Introduction (00:20)

Manuel Lemos: Hello, welcome to the Lately in JavaScript Podcast, this is episode number 9.  As always I have here my co-host, our official expert in foreign languages, Michael Kimsal, hello Michael.

Michael Kimsal: Number 9, number 9, number 9.  Hello!  Good morning, Manuel or good evening.

Manuel Lemos: Actually I was expecting you to say that in...

Michael Kimsal: Latvian?

Manuel Lemos: Latvian language.  No, you don't know Latvian?

Michael Kimsal: No, sorry.

Manuel Lemos: That is a big fault in your career.

Michael Kimsal: It's a huge fault.

Interview with Arturs Sosins a Top Contributor of the JSClasses and PHPClasses site (1:00)

Manuel Lemos: So maybe you can learn about Latvian with our guest, Arturs Sosin from Latvia.  Hello, Arturs, how are you doing?

Arturs Sosins: Hello, I am fine, thank you.

Manuel Lemos: Well, this episode we decided to invite Arturs because he has been a great contributor not only to the JS Classes site on which he has been sending a regular batch of good JavaScript objects, but also in PHP Classes he also has been sending a great number of good contributions for which everybody that is following the sites have been enjoying.

And today we invited him to talk a bit about his work.  Arturs, can you talk a bit about yourself?  We already mentioned that you are from Latvia, can you talk for instance how old are you, what you do for a living?

Arturs Sosins: Yeah, sure.   Well, I'm 23 years old, I'm working in a small, small company of two men, me and a designer, we are creating web sites here in Latvia, and I am still studying in Latvian University and I will try and get my master's degree in computer science.  I am married and I have a little son who is one year old.

Manuel Lemos: So you have to do a lot of work to support your family.

Arturs Sosins: Yes, yes.

Manuel Lemos: So you said you develop sites, I assume that you are working for customers.

Arturs Sosins: Yes, yes.

Manuel Lemos: So are those customers from Latvia or around the world?

Arturs Sosins: Right now they're mostly from Latvia, some local Latvian companies, events that need web sites and that kind of stuff.

Manuel Lemos: But do you only work for customers from Latvia for an option or for the lack of offers from other countries?

Arturs Sosins: I don't know, we didn't try and even reach other countries, right now there are plenty of offers to work here and we are just doing our work.

Michael Kimsal: (Speaks Latvian)

Arturs Sosins: I was wondering if you're going to say something in Latvian.

Michael Kimsal: Did I say it right, was that close enough?  Was that good?

Arturs Sosins: Yeah, that was good, pretty good.

Michael Kimsal: (Speaks Latvian) Was that good?

Arturs Sosins: Good evening.

Michael Kimsal: Look at that, I'm done, I'm done, I got two for two, I'm finished.

Manuel Lemos: I cannot believe.  Did you just learn that?  No, you learned it before the show, right?

Michael Kimsal: What do you think?

Manuel Lemos: Now I'm wondering.

Arturs Sosins: Your reputation is saved.

Michael Kimsal: Yes.

Manuel Lemos: Okay, well, actually Michael suggested inviting you to the show precisely because every month we comment on the latest objects published...

Michael Kimsal: And you're always up there, you're always contributing something.  So I want to know, I'm going to jump in here for just a moment, I'd like to know, Arturs, where do you get the ideas for some of the objects that you're contributing?

Are these just things you're developing for your current clients, for your current work, or do you develop them and you contribute them out, or do you think oh that would be a great thing to do and then maybe you do it and use it in a client project, or do they not mix at all?  How does that come about, because you've done quite a lot of packages?

Arturs Sosins: Well, I have a term something like leisure programming, leisure developing, where I have at least one to a couple of hours a week I try to look into different things trying to create something new, and mostly create packages just for leisure, for curiosity, to satisfy my curiosity. But there is almost no package that I didn't use after that in real life development.

Manuel Lemos: So you are sort of publishing after you found some application that you already used in those classes, or you just motivated yourself to contribute and then you ended up using those objects in your own applications?

Arturs Sosins: Usually I develop them and then after...

Manuel Lemos: You figure who the application.

Arturs Sosins: Yes, I usually don't have a client who knows what they want.  We have clients who know what they want, well, you're really lucky, but they usually say we'd like a web site.  Well, special features, they don't know, so I can just open JS Classes web site and look at packages and say I could offer you this or I could offer you a shortcut, keyboard shortcuts, I could offer you QR Code generation and stuff like that.

Manuel Lemos: Oh, do you actually show the site to your customers or just use that to pick ideas for improvements in the customer's application?

Arturs Sosins: It depends on the customer.  Usually I just tell them about the ideas, but sometimes I show them so they can see what other options, if they have some understanding of Web development I show them what could be implemented, they could research and watch for their own what they do really want.

Manuel Lemos: So the site ends up helping you to sort of show your work to customers, right?

Arturs Sosins: Yes, yes, yes.

Manuel Lemos: So I think that would be a good tip to other authors to also submit their packages and then show their portfolio of public submissions to their customers and sort of demonstrate your capabilities.

Because from what I could tell, we've been commenting in previous shows, not just the Lately in JavaScript, but also the Lately in PHP, because not only your classes, objects, demonstrate that you are quite a capable programmer, but they also demonstrate you have a good sense of creativity because certain components are quite innovative.

Well, I'm sure the whole community appreciates that rate of contributions and their quality and utility of your innovations, and I would like to thank you for that because everybody's appreciating a lot.

Arturs Sosins: Yeah, about innovations, it's something like that at work when we are building the web sites, well, it's not much to do, it's not challenging enough, so in this creating JavaScript and PHP classes I try to find some challenges and then overcome them, some problems, and overcome them by these classes, so I guess that's where innovation comes in.

Manuel Lemos: So, by the way, do you also look at other people's contributions and eventually use them or you just use your own code?

Arturs Sosins: Well, I was a member of PHP Classes for a long time before I started to submit something, and most of what I did I was using other people's components.

Manuel Lemos: Yeah, that's interesting because I noticed that some people actually come to the site just to take ideas, actually look at the other people's contributions and learn how certain things are done because they did not have an idea and look at the code.

And sometimes they end up using just the ideas not the actual code but, well, the idea of the site is to share knowledge of components that already built and they have implemented functionality, so the overall community knowledge grows.

And I think in general it's very interesting and we are happy to have you here. And we'd like also to know if you have other interesting projects yourself besides those that you have published in the JS Classes and PHP Classes sites that you would also like to mention?

Arturs Sosins: Well, right now I don't have any other projects, got an idea, got something started but nothing to present for now.

Manuel Lemos: Oh, maybe you are hiding some secret components or big applications.  Well, that's okay, just kidding don't worry, but let me just tell you that this space is always open for you to sort of promote your work.

Arturs Sosins: I could add for me as a developer that from the start I was I can say shy to submit something that I created, that's why I was a long time just using other objects and didn't submit anything.

And so I want to try to maybe encourage other developers and tell them that there's nothing to be shy about.  I was thinking I would make some stupid mistake, you know, and that others maybe won't understand, and I just overcome that and I would like to say that submitting your class really provides you feedback and investors I might say, and it really helps you to acknowledge your skills and maybe even raise your programming skills and your level.

Manuel Lemos: Yeah, because from what I could tell the JS Classes site is not yet nearly as big as PHP Classes site because it's still a young site, but still there are many comments, I can see here in the comments section that people go on your package's forums and they comment about your packages.

And I'm not sure if they are asking for help or just telling you if they appreciate, but the idea of this site is that you expose your work and promote yourself, promote your work, get some feedback regarding opportunities for improving your packages, and the idea is mainly that.

Other than that, well, you mentioned that you already have enough work for yourself in Latvia, but if some company would like to hire you to do some special work would you be available, and if so, how could they contact you?

Arturs Sosins: Well, I think I could try to work remotely. I don't want to leave my country, my family, but I could try to work remotely and I would even be willing to try to do that to take some new challenges.

And so they can contact me by my email address which is arturssosins at gmail.com.  I have a small blog where I put some code snippets and publish recommendations for my packages, it's WebCodingEasy.com, and those are the main sources where people could reach me.

Manuel Lemos: Are you on Twitter or you don't Tweet much?

Arturs Sosins: I recently start using Twitter, yes, it's the same nick name, @ar2rsawseen, find me there.

Manuel Lemos: Okay, I think that is good to know.  And once again, thank you for your contributions, I hope you can still have time in the future to keep those contributions coming.

Arturs Sosins: Yes, I have a couple more ideas.

Manuel Lemos: I hope you have more than a couple but that's up to you.  Well, that was good to have you here, and I would like to invite you to continue with the rest of the show so you can also comment on other topics that we will be talking about regarding what has been happening in the JavaScript world lately.

SiteApps - JavaScript Web Applications Marketplace (14:54)

Manuel Lemos: And actually we are going to start with a topic that Arturs suggested regarding a new site, SiteApps.com.  Arturs, would you like to talk a bit about it and why you found it interesting in the scope of the JavaScript development?

Arturs Sosins: Yeah, so SiteApps.com is a website that would allow clients to implement web applications written in JavaScript, without the coding knowledge they provide the service.

And there is a part for developers like me, like many of the listeners, when they can take their JS Classes submitted objects and put them in real work.  They can create applications using it and even monetize and try to sell them or rent the application, the site provides all these abilities.

Maybe they're not much going on right now, but SiteApps community are listening to developer feedback, they are implementing new features, and when this kind of service will be popular then I guess that SiteApps might be one of the first ones to be on the market and present all these applications, so it's a great time to get in and lock your positions.

Manuel Lemos: So if I got this right is this a sort of marketplace or it plans to be, because as you mentioned it is still being developed, right?

Arturs Sosins: It's open already but there are still adding features and this kind of thing isn't popular yet, but as a Predicta company behind the site they are all about innovations and maybe it's one of the main reasons why joined and follow what they are developing and why I'm interested in it, it's a kind of innovative idea.

Manuel Lemos: It seems to be an interesting idea. I only gave a brief look at it and it seemed to be a sort of marketplace in which, as you mentioned, developers will be able to sort of monetize their work by selling applications based on JavaScript.

One curiosity that I have regarding this is do you only have to provide applications in JavaScript or you can use maybe some Web services in which you have some service being provided maybe for a fee or something? Is that how it works or do you have strictly to provide all the JavaScript code for the aplications?

Arturs Sosins: Right now it's mainly JavaScript but I guess you can write JavaScript application that would communicate with your server and that is how you could provide a service with a monthly fee, but the language accepted is JavaScript for now.

Manuel Lemos: Right.  I think JavaScript would just be sort of the glue that will link site applications to eventual external services, maybe yours or somebody else.

I think we will keep an eye on this and maybe on a future show you can actually invite people from that company, Predicta.  I realized they're actually also from Brazil so probably it wouldn't be hard for me to talk with them, but we'll see what they have in mind and if they would be interested to come and talk a bit about this.

Selenium 2.0 Released (19:17)

Manuel Lemos: But now moving on to other interesting topics, things that have been happening in the JavaScript world, one interesting and actually a very popular package that has been released is Selenium 2.

For those not familiar with Selenium this is basically a testing framework. Personally I'm not a big expert on this, but I think it will be very interesting to follow because since this is a major new release it certainly addresses new big features that have been launched.  Personally I don't have much to comment about on this, I don't know if you guys have been following Selenium development.

Michael Kimsal: I'll jump in, I'm going to jump in because I haven't said anything in a while.

Manuel Lemos: I was just waiting for you.

Michael Kimsal: Well, I was waiting for you to give me a moment but I'm going to have to steal it. So, I have not used Selenium 2.0 yet.  This news just crossed my desk maybe a week or so ago, the announcement only came out I think on the 8th of the month so it's pretty new.

I first started using Selenium years ago and only ever used it with the JavaScript on the front end that would just drive the browser below it.

One of the things I learned later on, it was harder to use from PHP though I think it got easier, there's something called Web Driver where they have bindings to different languages that will let you fairly easily spin up a browser, programmatically tell the browser to do things and get the results, so you could write your tests and just treat the browser as a component which was pretty interesting.

Reading their news or press release about this, what was more interesting to me is that support for Web Driver is now baked into both Opera and Chrome and the Selenium people are working with Mozilla to make sure that the drivers work with Mozilla as well.

I did not know that the concept or the Web Driver idea was something that browser makers were also participating in, so for me that was a bit of an eye opener that this wasn't just somebody... it would be sort of like somebody writing a web robot that just goes and does screen scraping.

Well, instead of just screen scraping a particular site says here's my API, you can access my data directly, that gives you a whole nother level of stability and access, so it was really interesting for me to see that.

I don't see anything specifically saying that Microsoft or Safari explicitly have Web Driver support, but my understanding is that the Selenium Web Driver still on the Selenium side, they can still interact with Safari and IE, but it looks like it's probably going to be more easy and supported on Opera and Chrome.

Manuel Lemos: Well, actually in the past it used to be I think a Firefox only thing, right?

Michael Kimsal: Well, early on it was, but a couple years ago I did set up... no, it was almost two years ago I do remember setting up, no, there was support for IE to drive IE in some version of what I was looking at, some version of Selenium I was looking at, but I didn't have IE at the time so that didn't matter to me specifically.

Manuel Lemos: Right.  Arturs are you going to comment on something?

Arturs Sosins: Yeah, I was just wondering what about mobile home browsers, does the Selenium second version support them does anyone know?

Manuel Lemos: We'd have to check.

Michael Kimsal: It says here in the press release, “Web Driver also works on Android and iPhone allowing you to test your sites on the next wave of the Web.”  Now, how easy that is, if you can actually programmatically maybe drive the iPhone emulator or drive an Android browser through the emulator I'm not sure how that works, but it does look like they're aware of it and continuing to work on that for more mobile support.

Arturs Sosins: That's great to know.

Manuel Lemos: This is quite an advanced package for testing because it can capture the actual events that are going on in the browser so you can check if they are what your application expects.

And actually in the past show, a guest mentioned that other than testing it was using Selenium as a sort of macro recorder which is, well, it's quite a sort of unexpected way to use it because it was not its main purpose, but since it can provide not only recording of events but also playback, I think it's interesting to understand how users are realizing these capabilities of Selenium.

Well, I think maybe in the future we could also have a show dedicated to it, I know Paul Hammant, a good old friend from England, that is working on the Selenium team and maybe we could have him to give his insights about the power of this tool because I'm sure we are under...  I'm not sure if it would be underestimating, but I'm sure we are not giving it as much coverage as it probably deserves now because it's just covering the latest news.

Node.js on Windows (25:23)

Manuel Lemos: And other than that, another interesting development in the JavaScript world is the latest release of Node.js which now among other new interesting features has a native Windows build that is being made available for download for those that would like to use it on Windows.

And on that note, I think that is a very important step for the future of Node because from what I understand, despite many of us that develop sites only used on the server side of platforms like Linux and probably not much else, in our development environment I think it's probably around 80% of developers use Windows.

And so if you can have Node running natively on Windows it sort of makes it easy for Node to be more accepted by the developers in general.

I know Michael uses Mac as his desktop platform, Arturs, what do you use for your development platform?

Arturs Sosins: What you said exactly in my case I use Windows and I never tried Node.js because I couldn't run it on my local host.

Manuel Lemos: So maybe now you can, you'll be able to develop even more interesting JavaScript applications.

Arturs Sosins: Yes, at least I'm willing to try.

Manuel Lemos: Because Node sort of... in my opinion, Node opened a new world of opportunities, it's a different way to develop server side applications, eventually those types of applications for which PHP would not be adequate because it would probably take too much memory like, for instance, if you have a chat server on which you have many users concurrently accessing a server, if you have that being handled by PHP it could work but it would take too many forking of the web server process and that would take a lot of memory.

But the way that Node runs, Node itself it provides a built-in http server so it doesn't need a separate web server, and it all runs in a single thread which may not necessarily be a good thing, but as long as it doesn't crash there are things that you can benefit from like sharing the context values that each of the... it's not exactly threads, but each of the requests that are being handled can produce their own information.

For instance, if you are running a chat server, every user that types something in the chat window will enter some text that will have to be distributed to other participants in the chat session, and if it is all running in a single thread every request being handled by the Node web server could have access to all the chat text that is in memory, and that would be quite fast, and all this in a single thread would take much less memory than a traditional PHP Apache based solution.

Michael, I don't know if you have tried any things specifically with Node that you would like to comment about.

Michael Kimsal: Hmm, well, I've done a Hello World.

Manuel Lemos: Okay, that's good.

Michael Kimsal: Ola Mundo for my Spanish speaking friends out there.  

Manuel Lemos: What about in Latvian?

Michael Kimsal: I'll tell you in Latvian, you just have to hold on for a moment, I got to think very hard.  I would say (speaking Latvian) World.

I've done a little bit, I've tried, I think I mentioned this a couple episodes ago, we had a presentation on Zombie at a local user group, and Zombie is a headless browser for Node, and I saw the presentation, it looked really awesome, I tried to get it to work on my local machine and I couldn't get it to work.

So I spent some time and I just followed the instructions and it didn't work, so I went through and I spent some time going through a little bit of Node, I did my Hello World, did a couple of  "let me try this", let me take some and do something, so I wanted to make sure that I understood enough of what was going on with Node to make sure that it wasn't something I was doing wrong.

I think the whole Node ecosystem is still moving pretty fast, and from what I was finding with Vows and Zombie and some of the other plugins were people saying well it worked for me on this version but it didn't work on this version, and the next version it will work again.

And as neat as some of the Node system is, it feels a little fragile to me right now, and if I spent more time, if I just sat down and said I got nothing but a week or two and I'm just going to focus and just get in and do all this, I could probably get it and figure out all the issues and it would become very natural.

I don't have that kind of time to put in, so I'm at the point now where I have to wait for some of these technologies to get a bit more stable and get some of the kinks worked out before I can really get involved.

But I continue to watch and I'll play now and then and see how that works out, and I suspect that the Windows release is going to have a bunch of effects. One of them will be a lot more people coming into the Node world and a lot more bugs getting found and a lot more bugs getting fixed and a lot more activity happening.

So, all of those things, I don't see the Windows port being bad, I think it's going to bring a lot more people into the fold, I think from my standpoint that's going to make it a lot more crazy in the short term, maybe six months from now we'll see even more stability there.

Manuel Lemos: Right.  Well, for those not familiar with Node let me just give you a preview of what you'll get when using Node. Node, one of the core I would say ways of doing it is to push asynchronous programming as much as possible.

This means that from now on if you are used to let's say opening a file and your program will continue after the file is opened, with using Node that is different, now you open the file and pass a callback function that will be called when the file is open, and the same for every other IO operation, reading files, writing files and accessing networks, even DNS operations all asynchronous.

Some functions, some IO operations have a support to be done synchronously, but the idea is to do asynchronously. So if you are used to doing that all synchronously in the language that you've worked before, PHP or Python or Ruby or Java, C#, whatever, Node pushes things in a different way and you have to wrap your mind around it.

So it's not like it will be easy, you have to change your mindset on the way you write your code.  But the good side of this is that this way of working asynchronously allows your applications to make a more efficient use of resources, and that's why you can have a single, a web server running a single thread. But this is just to give an overview for those that were not yet familiar with Node but are considering looking into it.

I think about Node that the most important thing to comment about for now is that as Michael mentioned it will bring a lot of people that only use Windows on their desktops for development thanks to this build that is now being made available natively for Windows.

JSMad - JavaScript MP3 decoding library (35:20)

Manuel Lemos: But moving on for now with other news, now I would like to comment just a bit about JSMad which is basically a library for decoding MP3 audio streams which is quite amazing because actually MP3 is just an alias for MPEG Audio Level 3 which is just considering the audio streams of an MPEG stream.

And what this library, JSMad, does is basically to decode streams, audio streams in MP3 so they can be played back in a browser that provides some support to playback audio using I suppose the HTML 5 APIs.

And what got my attention regarding this is that decoding MPEG streams is not a trivial task, and this being done natively in JavaScript really demonstrates on one side the kind of heavy tasks in which JavaScript is being used nowadays, and also the capabilities of the developers that are being attracted to do these kinds of things on JavaScript.

And I think it's quite amazing, as I mentioned, decoding MPEG streams is not a trivial task.  What do you guys think of this and probably other similar projects that do non-trivial things in JavaScript?

Arturs Sosins: I didn't even know that it was possible.  Well, I knew there are more beyond the front end developing options in JavaScript, but I didn't think that this kind of thing would be possible using plain JavaScript.

Manuel Lemos: Yeah, maybe it will probably give you other ideas about other interesting JavaScript packages.

Michael Kimsal: From my standpoint JavaScript is, well, any language is just something that processes data and they do it in different ways, JavaScript is no different, it still processes data.

So from that standpoint assuming that one can get access to the data stream, and I'm not trivializing it, I'm not trying to say "oh, it's a no-brainer", but MP3 decoding software has been written in other languages for a decade or more, it's not an unknown problem.

It is quite novel that it's being done in a browser very similar to the PDF.js that we talked about last month, a PDF renderer in JavaScript.  And, again, if you look at Ubuntu and some of the other Linux desktop packages, GhostScript, PDF rendering is not an unknown problem either, the novel aspect is "oh we're using a language that people haven't used before and we're doing it in a different context".

So it's interesting and it's novel and I'm not saying that I could do it, but I think we are seeing that people are looking to push the boundaries as to what's possible in JavaScript, and we're mostly looking at even a low end, even if you go buy a machine for a couple hundred dollars it has a couple of gigs of RAM, it's got a couple of gigs of processor, even the really low-end throwaway hardware still has enough processing power to handle these sorts of tasks these days.

The other interesting thing to me is, if I remember seeing the JSMad demo, is that it doesn't work in all browsers, and we're seeing, what I'm seeing I should say and maybe others are seeing it as well, is... let me back up, because 2005, 2006, 2007 we started seeing the rise of things like jQuery and YUI, we saw these libraries that would extract all the differences in the DOM models, so you could write a piece of code and it would run, you could write JavaScript effects, you could write a JavaScript app and have it run in all the browsers.

And in the past few years I think we've been seeing a decline in maybe the respect or the fear that people give Microsoft, and we've seen that in all levels, and we're seeing it in the envelope pushing that people are doing in JavaScript.

If you look at the JSMad thing it doesn't run... I think it only runs in Chrome, maybe it will run in Firefox at some point, it probably won't run in IE for years, maybe it will run in IE 10, and nobody cares anymore.

So people are a lot more willing to experiment and push and try new things, and they could do it and they'll actually get feedback.  I think five years ago, six years ago, you could've written a really awesome rendering thing that took very strong advantage of something in Opera, for example.  Or what if you'd written an MP3 runtime or realtime decoder in JavaScript but it only ran on Opera, nobody would care unfortunately.

It's frustrating me that Opera never got as big as I think they could have, but we have some of these "alternative browsers" these days, and collectively, for a lot of people collectively Safari, Firefox and Chrome probably for a site owner they make up more than 50% of their traffic.

So people are willing to say sure I'll do something, and it might be Chrome only, or maybe it's Chrome and Safari, maybe it will get ported to Firefox.  Hey, if they only support Chrome, Safari and Firefox they may still be reaching 40 or 50% of their audience.

And the people that are pushing these envelopes are generally writing these tools to be used by other techies who are probably using Chrome or Safari or Firefox.  I'm sorry to ramble there, but it's an interesting phenomenon to me, and I think this will continue to accelerate, we'll see more experimentation in other browsers.

Manuel Lemos: Yeah.  Actually now that you mentioned Microsoft, at least in the JS Classes site and PHP Classes site which has a similar audience, IE audience is below 10% now, so it seems to be dying or something.

Arturs Sosins: At least for developers.

Manuel Lemos: Yeah, that's a very specific audience, you cannot generalize. The rest of the world is probably at least 50% of IE being used.  But like Michael mentioned, what is interesting to notice is that now developers are not afraid to publish things that probably won't work in once dominant browsers like IE, but that's just one curiosity.

PDF generation with PDFKit (42:55)

Manuel Lemos: But moving on to another thing that has been released lately, and actually Michael has just mentioned also PDF support, not only parsing and rendering but there is now a library named PDFKit that is meant to run on top of Node.js for generating PDF documents.

And it's quite interesting because it sort of enforces what we have said before. Now that you have a PDF parser and also a PDF generation library you can have a sort of PDF editor, you just need to probably have a GUI for editing it on a browser, and soon enough you will have full word processor capabilities being a natural thing, not like Google Docs that is still a bit, in my opinion, a bit forced implementation of word processing and spreadsheet, it is not very fast, at least from my experience, to edit documents, but these libraries probably many things can be done much faster on the browser for document editing, I don't know what you guys think about this.

Arturs Sosins: Well, I hope that the PDF, this library feature, but they have good features, it provides features like vector graphic and SVG, but I was wondering would it be possible to simply generate PDF from HTML code to pass through this library, and I didn't find any of this option to do it.

Manuel Lemos: Yeah, that would probably have a great demand for that because for people working with web generating HTML is more natural. I know there are some libraries for PHP to sort of convert HTML to PDF, but for JavaScript I have not found anything specific but probably because I didn't look, but probably it is something that already exists and it would be very interesting to sort of have some level of HTML to PDF conversion because we are more natural working with HTML than PDF.

But, OK, I think we covered a great set of interesting news of what has been happening in the JavaScript world.

Latest JavaScript objects published in the JSClasses site (46:11)

Manuel Lemos: Now moving on towards the end of the show we have just a couple regular sections starting with the latest objects being published in the JS Classes site, and practically all of the latest have been developed and submitted by Arturs.

Arturs, while you are here can you give yourself your own overview of your own components that you have been publishing lately in the JS Classes site?

Arturs Sosins: Yeah, sure, one of them was Feedback Easy object which is a simple object that generates a form to submit information to Google Analytics like just rate a web site and submit a simple comment.

One day I was just trying to explore the possibilities of the options of Google Analytics and then I thought that I could try something like this, it worked pretty well and that's why I submitted it.

Manuel Lemos: That's quite interesting.  One more question that I have regarding that because I saw it, actually I approved it like every other contribution on the site, but I did not actually try it in practice.

Can you tell a bit more how it works? I understood that it collects some user feedback and then throws events that are handled by Google Analytics, but in the end what happens, those events appear in some Google Analytics reports or what is the use of that?

Arturs Sosins: There is a specific section in Google Analytics, Google events where you could just see the marks that are given to your web site, no, the rating, the comment or the people who just closed the form if you allow that option.  And it also sets custom variable on the visitor level to prevent submitting this form again, like leaves a cookie or something.

Manuel Lemos: Yeah.  So you end up with some special reports in Google Analytics that give you some useful information about the user feedback for you to take some action regarding what the users think about a certain page, right?

Arturs Sosins: Yeah, exactly.

Manuel Lemos: This seems to be very interesting because it's a less known possibility of Google Analytics.  I was just commenting with a friend who was telling me about this possibility of exploring Google Analytics events because he is developing not in HMTL and JavaScript but in Flex, which in practice is Flash.

And there is also an API for them to use from Flex to record events, and it's a similar principle with regular JavaScript applications, and this is a very innovative component that got my attention because of that possibility of using Google Analytics to record events that you may want to track and count and generate some useful reports.

But, okay, other than that, what other objects have you been publishing that you would like to comment on?

Arturs Sosins: Well, the latest one is Countdown object which might seem like a simple updating countdown but, well, the main thing you need first it displays month. I don't know why I didn't find any countdowns that would display months in time left, only display weeks or days or years, it might be too hard to calculate it but, well, I got it, I tried it, and the second thing that it has a four-month string where you can customize your countdown mostly as you wish, even usage HTML if you want.

So I recently needed also a countdown in one of my work projects, and I think I created this one so it could be used in many sites in the future and can be customized as I wish.

Manuel Lemos: Yeah, actually also other classes that do this sort of countdown, but they were only for PHP so they would basically only show the countdown to a certain time in a static form, it wouldn't be updating every second or every minute or regularly, it's just you were required to refresh the page. So it's interesting but it's a very simple component in terms of functionality.

Other than that, another component that was published recently, which was not from Arturs, is this Templ which is basically a template engine written in JavaScript.  Michael, did you take a look at this component?

Michael Kimsal: I did.  Aliaksandr Astashenkau, I hope I'm saying his name correctly, or pretty close, I think I am, from Belarus.  And I was interested in this for a couple reasons because I've been working on another project with a guy, and he had started using a JavaScript templating system and I think it was Moustache, which I think he's done it and I've just been kind of looking at what he's done and trying to parse it out, and I'm not sure to what extent Moustache lives within Rails and works just within Rails or if it's something that works outside of that.

But the idea of JavaScript templating, I was first introduced to it last year by Rebecca Murphey at a JavaScript user group in our area, and she gave a quick demo of something, so it's kind of been in the back of my mind.

Current project I'm working with somebody and he's using I think it's Moustache, he's doing something, so it's been front of mind.  And looking at what Aliaksandr has put together it looks pretty straight forward to use, and it's kind of made me think, ooh, that would be... because I'm very used to passing in, for example, a PHP array or a Groovy array into a PHP file or a JSP file and looping through all that.

So conceptually I understand templates but I never... I just haven't really taken the plunge in doing JavaScript templates yet.  But it seems that for AJAX applications from my perspective that seems where it would be a really handy thing to do.

Now, Arturs, do you have any particular experience integrating any JavaScript templating into your work?  Do you use JavaScript templating at all?

Arturs Sosins: No, I have never used them, I used Smarty templates in almost all of my works, but just like as you mentioned, my first thought was that it would be really handy for AJAX applications.

Michael Kimsal: Yeah, I've mentioned Rebecca to some friends before, I worked on a project with her last year, and I'm saying the name because some people... she's been fairly influential over the past couple of years in the JavaScript world, or in the U.S. anyway, because she's organized some conferences and does a lot of good writing.

But I worked on a project with her and she did a lot of front end Dojo, and so just everything, the whole front end app was just Dojo, it was a full app that just happened to talk back web services to the back server, and I never feel like I have enough time to start a project and learn how to do all that, but at some point I will, and at some point I will start using templating, might be Templ that I use.

Hopefully if that's kept up to date that might something I can start with because I want to feel like I'm doing more, personally it's felt like I keep up with a lot of what's going on with JavaScript, but I feel like in the last year or so that I haven't kept up with a lot of the cool stuff that's happening, so I definitely want to play more with these ideas.

Manuel Lemos: Right.  This package that we are mentioning, as mentioned before, it does not do anything unusual. It's very similar to many, many PHP packages or packages in other languages that we've seen before, but since it is done on JavaScript it can be well used in browser side applications.

Michael Kimsal: Let me say one more thing, I really like something that Alexander did on your site, he made a link to jsFiddle. jsFiddle is a browser, it's a site that lets you run JavaScript and see exactly what the output's going to be like.

So, I didn't need to download his code, I didn't need to install it, didn't need to do anything, I could just go to jsFiddle and start playing with his code directly, that was really handy because I got to see it, I could look on the screen, I could play with stuff, I got a really good feel for what it was like really, really easily, and it would be awesome if more people did that, or perhaps if you made that either if you did some integration with jsFiddle or if you on JS Classes made your own jsFiddle clone.

Manuel Lemos: That's a good idea to think about because I've been asked about that for PHP code, but for security reasons I wouldn't run PHP code.  But you also mentioned in the past show the Google Caja project that somehow protects you from certain actions that may be you would like to prevent, you would not allow, for instance, cross-site scripting attacks by running code that probably does that, steal cookies and sends them to separate servers, definitely it's a good idea and something that I would like to study and eventually implement something similar, I'll keep that in mind.

Michael Kimsal: It's not trivial to do because you have security to keep in mind, but I think it would certainly make exploring the JS Classes contributions a lot more interactive.

Manuel Lemos: Yeah, that's a really good idea.  Well, that's yet another thing that I would like to implement in the future, but I don't know when but certainly I'll keep that in mind because I can see the value that it would provide to the users coming to the site.

Well, anyway, until that is made available, any author submitting their packages can add the related links like this author did to jsFiddle, they can test the code and interactively and let the users try it before they actually download it, and that's very interesting.

Importing JavaScript packages from SubVersion or CVS repositories (58:37)

Manuel Lemos: Well, but moving on towards now very close to the end of this show, I just wanted to comment a bit about the contributions.  Actually for those that have been following the PHP Classes site that now it is possible to import packages, eventually large packages, to publish them in the JS Classes site from the existing CVS repository.

CVS is a versioning system that is actually not the most popular nowadays but is the oldest, and I started supporting CVS because I had many projects still in CVS repositories, but the idea is to expand that to Subversion and then to Git, at least those three systems will be supported.

And right now I'm finishing the support to Subversion, and when this podcast is released probably it will already be available, so authors that have packages they have another, let's say, project hosting system like SourceForge or Google Code or CodePlex, and eventually GitHub, they will be able to import those packages.

CVS support is implemented, Subversion is being finished, probably already done when you listen to this, and Git support is being done hopefully in the next weeks, and all this to say that since the latest weeks we had very few packages probably because at least the north hemisphere is on vacation, everybody went to the beach instead of submitting packages to the site.

We had very few contributions but we had a good discussion here about the very few that were submitted and that was already good enough, but hopefully next month the number of contributions will increase.

Also, thanks to the support of these version control systems that allow authors to import their packages with a fraction of the effort. In the past they had to upload each file of their packages one by one,  and that was a very tedious task and many authors end up giving up because they have too many files in their packages to import.

And now with practically only a single step of entering the repository address and importing the packages, they can publish their packages without the pain they had to go through before.  But this was just to comment on the apparent shortage of packages submitted recently.

Contributing articles to the JSMag magazine (1:01:49)

Manuel Lemos: And now practically at the end I would just like to ask Michael, Michael I assume that you probably don't have yet your lineup ready for the upcoming JsMag?

Michael Kimsal: Well, we've got some things but it's a little up in the air at this point, we are recording a little earlier than we normally do so I won't go into too much of that.

I will reiterate, as I do, just as Manuel is always looking for great contributions to JS Classes, we're always looking for great contributions to JsMag.

We do pay authors, we're looking for new, interesting and advanced and novel uses of JavaScript and articles for our JsMag readers, so if you're interested you can email me, Michael at jsmag.com and I can send you more information about how to get started.

So if you have something you want to share with people and you'd like some help getting that idea out, please get in touch.

Manuel Lemos: One thing that I have commented with Arturs before, Arturs is from Latvia, probably he was a bit afraid that his English was probably not good enough, but as you mentioned in the past, you have editors that can help you, right?

Michael Kimsal: Yeah, certainly if you're able to write code we can work with you, we have editors that help people if English is not their first language we'll help shape the English, and even for people who English is their first language that doesn't mean that they're great writers, and we have a couple of good editors that will work with you and they'll say, "Hey, I tried this, this doesn't work" or "This doesn't make sense," or "What did you mean by this?"  So they do a really good job.

Manuel Lemos: Yeah, that's always good to know, we always try to pass that message because not only is it good for the growth of JsMag as a great JavaScript magazine, but also another opportunity for authors that want to contribute to make some money and contribute to a community that they are enjoying, the JavaScript developer's community.

Conclusion (1:04:14)

Manuel Lemos: And, well, I think that we are practically done with this episode.  I would like to thank you, Arturs, for coming, I hope you can continue with your amazing pace of contributions that you are sending not just to JS Classes site but also to the PHP Classes site.

Arturs Sosins: I'll try, I'll try.

Manuel Lemos: Let me remind you of one detail, in PHP Classes site there is an Innovation Award prize that is being given every month, we nominate the most innovative packages.  And the reason why this award does not yet exist in the JS Classes site is because it does not have a large enough number of contributions to just highlight the innovative, practically all packages are somehow innovative.

Arturs Sosins: I just hope I won't run out of ideas when this contest actually starts.

Manuel Lemos: Yeah, but I don't think you will, that's my opinion.  But I hope that at most in one year I'll start the Innovation Award initiative in JS Classes site too, but I would definitely like to encourage everybody, do not wait for that to continue to contribute because the site needs to grow in number of contributions so I can get to that point.

Well, other than that, I would also like to thank you, Michael, for coming as always to give his insights, and on my part I think that's all for now.

Michael Kimsal: Yeah.  Thank, Manuel, for putting this together as always, thank you, Arturs, for being with us, it was great to talk to you.

Arturs Sosins: Thank you.

Manuel Lemos: That's all for now, bye.

Arturs Sosins: Bye, bye.


Login to Post a Comment

Login Immediately with your account on:

Facebook ConnectGmail or other Google Account
Hotmail or Microsoft Windows LiveStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.


<< Previous: Google+ to Embed 3rd ...>> Next: JSClasses site 1st An...

  Blog JS Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog SiteApps, Selenium 2,...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)