Author: Manuel Lemos
Updated on: 2011-07-01
Posted on: 2011-07-01
Download Size: 23MB Listeners: 1224
Introduction music: Riviera by Ernani Joppert, São Paulo, Brazil
RSS 2.0 feed compliant with iTunes:
Michael Kimsal: Hello. I am fine. Notice how I didn't even try to talk over you there.
Publishing packages in the JSClasses imported from version control repositories (1:05)
But first I would like to comment a bit about certain features that were made available not only in the JS Classes site but also in the PHP Classes site which is the brother site of JS Classes, and PHP Classes site just made 12 years of age which is quite a long...
Michael Kimsal: (Singing) Happy birthday to you. Cumpleaños feliz.
Manuel Lemos: Oh, please, don't mention all the languages that you know.
But the important thing is that I plan to release an important feature that has been in the to-do list for many years which addresses the needs of many developers that want to share their packages but they have many files, and the traditional way to submit packages to the PHP Classes site would be to upload each file individually, and since that would take a lot of time many authors of large packages ended up giving up and not submitting their packages.
So what this feature allows is to submit a package by importing it from a version control repository. Currently only CVS repositories are supported but the support for Subversion and Git is being worked on as we speak.
And the idea is that with just a few clicks you can import a whole package and the site will retrieve the descriptions of all the files, try to guess the types of the files if they are images or source code or documentation or other types of files that are supported by the site.
So in the end the author that is submitting the package has much less trouble in trying to submit the package and describing it appropriately. So I think this is a great enhancement that hopefully will attract more packages, more developers to submit packages to the site.
So this was one feature that I wanted to comment about that was released on the anniversary of the PHP Classes site just a few days ago, and is also available in JS Classes site.
Another minor feature that I'm not sure I think it was you, Michael, that also commented about having the possibility for the logged user sessions to go for a longer period than before.
Michael Kimsal: Could've been me, that was probably me, yeah.
Manuel Lemos: Yeah, because it addresses one regular complaint that I was noticing some people on Twitter that were complaining that they had to register every time when they accessed the site to download some package.
Well, as I explained in a blog post that I will mention in this podcast show notes, the blog post in the PHP Classes site blog about the anniversary of the site basically explains which is something that's probably not very clear for everybody, which is the fact that the login requirement for downloading a package is an option of each author.
So the author can turn it off or not. If he doesn't do that, disable that option, the site will be able to provide several things that are available to many others which is the ability to control which users are downloading a package, and show them how many users have downloaded the package and build a ranking.
And that is one factor that encourages authors to contribute more so they can see themselves going up in the ranking as they contribute more and more useful packages. And in the end it benefits the users, but for users that do not understand this requirement or are not aware for some reason, they did not want to read the explanations in the site FAQ, they will rant and complain.
And there was this user in Twitter that I noticed he was complaining that every time he went to the PHP Classes site he had to re-register again. Well, you only have to register one time, but since he actually did not have patience to remember his previous account, he was trying to create a new account and needlessly create new registrations.
And that happened because the last time the user was accessing the site he was no longer logged in because it passed more than one month. So with this new feature that allows you to be logged at least for one year, actually you are given options to be logged in for one year or just one month or one week or one day or just for the session, you can control for how long you want to be logged in.
But since the default is one year hopefully I expect less people to complain about having to register again which is totally needless. So this is one of the features that will also benefit either the PHP Classes site and JS Classes site users.
But these are just a few features that I have been working on. I will also continue to work on other features that will promote better the work of authors that publish in the site, get them more visibility, so for now those that want to learn about how exactly this CVS import that is also going to be Subversion and Git import, they can just read the blog post in the PHP Classes site and then they will be able to submit large packages without so much effort as before.
Michael Kimsal: Yeah! Okay, I'm throwing in here now, just going to jump in, I thought it was a really interesting release, did you play with it at all?
Manuel Lemos: Not really, I did not have time. I just realized it just a few days ago, but from what I know from the PDF format it's not a trivial library.
Michael Kimsal: Well, I don't think that, from what I remember, I don't think there were any stated plans to support the encryption aspect, at least, again, stated, there may be something in the works for later on.
I had looked at the code earlier, I'm pulling it up again right now to look at because, no, sorry, I didn't see anything stated but I actually see a crypto.js file here, and as of 40 minutes ago there was some change to pdf.js itself, the core, it's 4,700 lines, 4,335 software lines of code, SLOC count.
But it looks like there's quite a lot of... there are blocks of how-to, blocks of encoding, brace left, brace right, tilde, just a lot of the common encoding terms.
Manuel Lemos: You mean to parse the...
Michael Kimsal: Yeah, how to parse standard encoding, how to parse ANSI encoding, so font embedding and all that kind of stuff I'm sure there's going to be a lot of work for them to do, but by most accounts that I'd read after some of the initial criticism is that it's quite an impressive feat of engineering that's been done so far.
Manuel Lemos: Oh, I suppose they still have a long way to go, but just the fact they have decided to go for it seems quite brave because I have a superficial knowledge of the PDF format, it's basically an evolution of PostScript as an actual language, and the PDF just turns certain functions into built-in, functions of PostScript became built-in.
Michael Kimsal: No, it's not. So hats off to you guys, it is Andreas Gall and Chris Jones, or at least it looks like the two initial guys behind the PDF.js.
Manuel Lemos: Right. And it seems that one of the goals is to have a built-in PDF rendering engine that does not rely on plugins or anything else outside the browser. So you could even probably do some special PDF processing with these libraries because I think there are some variants of PDF format like those PDF forms and, well, if they get to that point of supporting those things they have really gone very far.
Michael Kimsal: I'm wondering too what the plans are for allowing partially what you're talking about, things like PDF forms and whatnot, programmatic access in the browser to PDF data and to PDF forms, but I'm thinking later on there may be some more interesting things that could be done that maybe aren't supported in standard PDF API's right now but text extraction maybe realtime...
Manuel Lemos: Yeah, generic parsing.
Michael Kimsal: Yeah, reading of the text and maybe on the fly translation of the text as well too, so from that PDF read it in and offer translation services right in the PDF.
Manuel Lemos: I think if they actually also do the opposite which would be to couple a PDF writer library they could have a full PDF editing feature right in your browser.
Michael Kimsal: That would be really slick too, certainly.
Manuel Lemos: And it certainly will provide a very powerful document editing engine, although I think that would be a very long way to go because it's quite complicated.
Michael Kimsal: At least a few weeks. At least a few weeks.
Manuel Lemos: With how many developers?
Michael Kimsal: I would say the reverse might be easier in some ways, the creation of the PDF's.
Manuel Lemos: The creation yes, but the whole editing I mean providing...
Michael Kimsal: Sure, runtime editing, yeah. Yes, editing, I was thinking just creation is probably somewhat easier.
Manuel Lemos: Visual editing I think, but by the time you realize you are developing a real word processor built in your browser, not those types of built-in HTML editors.
But, well, kudos to the developers. I think the list here shows at least four or five people, and as the project gathers more attention I suppose they will attract more developers to contribute with other parts that are necessary to make this a complete PDF engine. Well, we'll see.
Michael Kimsal: Are you talking about Caja?
And this is a project from what I understood is from Google people themselves. It's hosted in Google code, but the way I see this project is that they probably intend to use it widely in some other project that I don't know what it could be but I have a few ideas.
Michael Kimsal: I think they can use iframes, but it can also just take the data and take your output and plop it in, well, I guess it is do an iframe either way.
A couple of thoughts that I had on this when you're talking about Google's motivation for this, and one feels to me assuming that this is, actually it looks like it is, there are some Google people involved, is that they have every incentive to try to get people to make it safe to embed this stuff and make it easy to embed these sorts of things.
And to whatever extent they can make this work great in Chrome and get more people to do that, that's one more way of getting more Chrome adoption and more Google control over when and how these sorts of things are done, as opposed to certainly Firefox will follow suit, other people may follow suit, Safari and so on afterwards, but they've got a lot of business incentive to drive this and it will be interesting to me to see how well this plays in the mobile space as well too, or what effect this has.
Because if I can start embedding stuff, if I have a nice mobile browser or tablet browser and I can start embedding widgets that's one more blow against the native app notion we have to have native apps for a Tablet. So I think there's some cool tech stuff going on, but the political motivations to me are maybe a bit more intriguing, easier to speculate about that too.
Manuel Lemos: Right. Since we don't know exactly what is the motivation of the project, at least I did not find any information, we can only speculate. But your point of targeting this with the goals of the Chrome project to get more people to develop in browser applications is one interesting possibility, it could be the main motivation.
So probably there are other types of control. I don't know if they probably intercept the access to the current document cookies which is the source of cross-site scripting attacks. But back to the motivations, when I mentioned Facebook I figure that probably, this is all a big speculation, probably there is that rumor that Google is working on their own big social network to compete with Facebook.
Michael Kimsal: Orkut
Manuel Lemos: Well, Orkut is basically dying from what I understood. It only has adoption in Brazil and India and still it's losing big time to Facebook.
Still for the rest of us developers that don't have anything to do with Google or Facebook or whatever social networks, the implicit competition that goes on there, there are plenty of good uses.
You can also have your own ecosystem of applications that you could embed in your own sites, it crossed my mind for instance having some support to embed third party applications in JSClasses and PHPClasses, and that would allow for instance authors to enhance the services, the features that they provide in their own package's pages and somehow extend what the site provides.
So, I think we have to wait and see and we'll be keeping an eye on the evolution and specifically the applications of this library, Google Caja.
Manuel Lemos: Now moving on to a regular section of the podcast, we're going to talk about the latest objects in the JSClasses site. Michael, what objects do you think would be worth mentioning this time?
Michael Kimsal: Well, there were two that struck my mind, struck my fancy here, one was a Skype Status which is kind of a small class that just lets you embed the status of a Skype user, generally it would be yourself but you could easily display if you're online, offline, available, whatever your status would be, that is Arturs Sosins of Latvia.
Manuel Lemos: He's a regular contributor.
Michael Kimsal: Thank you Arturs. And then the other one that sounded neat, I wanted to look at it yesterday, I haven't had a chance to play with it, but it sounds very computer sciency, and that is the Fuzzy Logic from Wojtek Jarzecki from Poland.
Manuel Lemos: Actually your pronunciation is wrong but don't worry. These Eastern Europe languages certainly have a different way of saying them but don't worry.
Michael Kimsal: Well, I grew up in Detroit and we had a very large Polish population there. We would have said Jarzecki or Iarzecki, and we had a lot of Wojcickis in our neighborhood, everybody got to figure out how to say their name so I should have been able to say that more accurately.
But I think if you're into Fuzzy Logic and Logic stuff in general this might be an interesting one just to look at. I used to take Logic classes in college, I probably should be a bit more up-to-date on that, but that was many, many years ago.
And it's quite interesting because it is from a person that is from a very specialized area, and he knows that area very well, and this level of components that we are seeing both in JS Classes and PHP Classes sites really demonstrates how advanced and sophisticated the components could be and skilled are the authors that contribute them.
And I'm sure somebody from this area of complex systems will appreciate these components, at least more than I could because I'm not from that area. I probably would not know all the applications on which this could be used, but kudos for Wojtek, if that is the right pronunciation, for his contributions.
We hope to see more advanced contributions from him in the future. And just a side comment, Wojtek age is 61 which just demonstrates that you are never too young nor too old to contribute and share your work in the PHP Classes and JS Classes sites and to the benefit of a large community.
Michael Kimsal: Awesome, awesome to hear. Great.
Manuel Lemos: By the way, you also commented about the Skype Status object, I just wanted to add an additional comment which is the fact that there are also very simple HTML snippets that you can put in a page to evaluate the status of a Skype user.
The difference, the enhancement that Arturs implemented with this object is that it keeps polling the server, the Skype Status server, to update the icon that is shown that demonstrates the online status of the users, because those traditional snippets, HTML snippets that you put in a page that show the Skype Status, they just don't update until you refresh the page. So that was the additional feature that I wanted to highlight on that component.
Now, as for my part I would like to highlight the Auto-Pop component, Auto-Pop New Field object that was contributed by Joseph from the United States. And this is a very interesting component that addresses a recurring need, for instance, when you have a form with several inputs to add records of, for instance, users or something else.
And what this component allows is that it can show a user interface, for instance, line oriented on which you see one record per line, and if you want to add a new record it just replicates, creates a copy of the inputs on the previous row and just leaves them empty and automatically adjusts the name of the inputs so they are not the same as in the previous row, so that could be used to implement those kinds of inline record editors like for instance when you show a lot of records in a table, you can just add another row and each component does something automatically for you.
Michael Kimsal: I'm looking at Joseph's online demo of this right now, and you choose something, you say first name last name, after you tab out of the last name it just adds another line with the same fields just another row of that.
Joseph, if you're listening, something that would make this even more awesome is to add an automatic delete button because if I tab far too far like I don't need that row anymore, let me click something to delete it, that would be really slick too.
Manuel Lemos: Yeah. I'd also like to add another comment on that is that over time we got used to develop with a server side language, in our case mainly PHP, and we often encountered this situation where we have to design a page that lets you edit records of users, and if you can edit them directly on a table that shows them that will be fine.
And I've been developing certain plugins for a forms class, actually it's almost a framework because it's a quite large set of classes. And I have a specific plugin for implementing CRUD interfaces, I mean create, retrieve, update and delete.
And I've been always trying to figure a solution that could implement a more user friendly interface that would not require to refresh the page to load it with inputs that will allow you to add an existing record.
And at least this component addressed the need to add a new line, so it would be great if it could also not only address the need for creation of new records but also deletion as you mentioned, and while you are at it, it could also implement update functionality which would involve probably some AJAX based communication I think.
But other than that, the other component that I would like to mention is this Keyboard Shortcut by Arturs Sosins again, he's a very frequent contributor.
Michael Kimsal: He's a busy boy, a very busy boy.
Manuel Lemos: Yeah. And, well, since he has submitted so many packages so far, 14, he has attracted so many users so now he is number one of the week in terms of downloads of packages, and all-time he is number two, so very soon he became number one.
But this is an interesting thing to mention is this package, what it does is that it reads a string with a specification with keyboard sequences, key sequences, that you want to detect when the user is pressing.
For instance, if you want to detect CTRL-Alt -A you can pass a string that defines that sequence and it will register an event handler, when those keys are pressed while you are on a page, it will call your event handler function that you have registered.
And this seems to be quite useful, for instance, if you want to implement games on which you want to allow users to let's say define the keys by which they can use to play the game to do certain actions, you can make it more configurable and eventually user friendly.
And this is quite interesting and kudos again to Arturs for his continued contributions. I hope he never stops, I'm sure he's very busy and probably I think we should maybe have him in a future show so he can talk a bit about his own work, so he can tell us the secret of his productivity.
Manuel Lemos: Okay, now moving on towards the end of our show we have a section in which Michael will comment on the upcoming issue of JS Magazine.
Michael Kimsal: Oh, goodness. I always seem to fall down here because I've had a month to prepare and I'm still not quite prepared.
But Mike Schwartz has another series, continues his series looking at server side development, he's looking at the V8 engine.
We had actually Damonte, Jean-Baptiste from last month, we actually talked about his GMap plugin on this very show, and I'd reached out to him and said, hey, would you like to come on and talk about, or write about the GMap3 plugin, and he's actually done that so he's going to be covering that.
Manuel Lemos: What is the name?
Michael Kimsal: Gnome, G-N-O-M-E, from Linux.
Manuel Lemos: Is it related with...
Manuel Lemos: No, I mean is it related with the Gnome library that exists for Linux?
Manuel Lemos: Oh, I see. It's a holiday Friday, I was not aware.
Michael Kimsal: Well, not, but it's a holiday weekend coming up so sometimes we don't actually put something out on a holiday weekend until after the holiday.
Manuel Lemos: Yeah, makes sense. Well, one thing that I wanted to ask you is about you always comment about the articles but some people are not really aware about how they can acquire the magazine, is it issue by issue or a subscription?
Michael Kimsal: Yes, you can go to jsmag.com, we take PayPal and Google Checkout, which between those two covers most of the world. You can buy single issues, so if there's an article in one piece, one article you like, you can buy just that.
There are subscriptions and it may help to clear up here that a subscription is simply a discounted price for buying 12 consecutive articles, or 12 consecutive issues, which generally works out to a year because it's a monthly piece, so you can start today and say give me 12 starting today and go 11 in the future, or you can start back from issue one or you can start from issue 7 and just say give me that one and 12 forward and there's a 10% discount on that.
Manuel Lemos: Yeah, this is quite interesting. Actually the question was about the price, what are the current prices for those who are interested to acquire?
Michael Kimsal: Just under $5.00, it's $4.99 per issue, and then it's $53.00 I think if you buy 12.
Manuel Lemos: Okay. And another question that I had, do you plan to have maybe a version for tablets now that they are a big hype?
Michael Kimsal: I've had a Kindle for a couple years, and I tried to get this to look good on the Kindle and it just didn't, other people have had better success getting some technical journals onto Kindle.
There seems to be I think a bit of a growing demand for it since it's something actually I have on my to-do list to evaluate sometime in June or July to look at other publishing. That said, ePub or Moby or something, but that said it comes in PDF and they look pretty darn good on iPads, which I have an iPad as well too and the PDF renders just fine, it's very readable on an iPad, so once the iPad came out for me there was a bit less of an urgency.
I have some people say I'd like it on ePub, but I also have other people saying, hey, I just download this and stick in my iTunes library and it shows up on my iPad and it looks fine.
Manuel Lemos: But, well, the question was if it will be available for purchasing via the Apple Store, whatever it is called. I think they now support subscriptions.
Michael Kimsal: They do, I'm not going to mess with that, they require a pretty big cut and it just feels like there are some hoops to jump through, I'm not sure that enough of my audience is really, I mean certainly a lot of people have gadgets and whatnot, but the people that we're targeting tend to be people who live in the browser most of the time anyway, at least for now, that might change.
Manuel Lemos: Do you consider, well, I don't know if it makes sense, but consider selling it for a higher price for via the Apple Store just to make up for the cut that Apple takes?
Michael Kimsal: I'm not sure that you're allowed to do that.
Manuel Lemos: Oh, have different prices?
Michael Kimsal: Yeah. You have to have the same or lower prices on the iPad Store, so I'm not sure for the audience that we're targeting and for what we're putting out, if we were to do a more interactive style publication it might make more sense to do that for tablets, but right now we're still living in the past doing, well, they're PDF's, they are still very much laid out for printing on your printer.
Manuel Lemos: Right. Well, it would be probably an interesting idea to have a more interactive magazine, but I don't know in this case what would be the benefits of making it more interactive. Maybe you could simulate the code that is running in the examples.
Michael Kimsal: Possibly. Possibly for the JS stuff, in video interviews maybe video tutorials, but I still think for lots of developers a lot of that stuff is going to be more practical on a desktop rather than on current tablets, that may change in the future with a future tablet.
Manuel Lemos: Well, I don't know, personally I think that tablets are a bit of a cut down version of nNotebooks, notebooks without keyboards, which makes them a bit less comfortable to use in many situations, but since they are now the 'new, new thing', a lot of people are getting them as if they could not live without them, but that's just a personal opinion.
Michael Kimsal: Sure.
Michael Kimsal: I'd love to.
Manuel Lemos: And bring always your good insights about this, so for me that's all for now.
Michael Kimsal: Thank you! Bye, bye.
You need to be a registered user or login to post a comment
Be One of Us!
Login Immediately with your account on:
No comments were submitted yet.