So where one project end another begins, I have developed some nice features for Lotus Quickr like HTML5 upload (same as Google has for Gmail), nice facebook-like chat using web-sockets and other nice (mostly GUI) features. But its over.
And where saga ends, saga begins.
So here we go for Xpages extension library and project Vulcan, what seems to be also nice things to be working on.
Showing posts with label HTML5. Show all posts
Showing posts with label HTML5. Show all posts
Wednesday, November 24, 2010
Wednesday, September 15, 2010
Shipping code wins. How 'img' tag arise
First chapter of book HTML5: Up and Running is called "How Did We Get Here" and shortly tells story how HTML makes it to its current position. It was very exciting reading especially along with 17-years old mail conversation, which shows, how 'img' tag was created. The true is, there was 4 proposals, how images should be inlined to HTML, and some of them was perhaps even better than today used 'img', so what makes it to current form? It was just implementation of code in one of the that day's browsers. So in this case was true, that shipping code wins. Off course its not the golden rule, but it can help. Author in chapter 1 also introduces examples, when shipping the code just did not help. This was true for some of dead branches of HTML evolution tree.
Besides this examples author also gets over past evolution of HTML in W3C and WHAT working groups. As you can know, there was initiative from W3C to bury HTML and replace it with "better" and more strict XHTML. but unfortunately this initiative was not successful and even without support of W3C development of HTML continues. And then in 2007 W3C cancel its own initiative on really strict XHTML 2.0 and instead continues in development of HTML.
So where was the problem of XHTML? it was at most in lack of backwards compatibility and restrictions for developers. In version 1.0 XHTML has something called Apendix C, which said sth. like, obey these rules, but there is a way, how to make an exception. This Apendix C was removed in version 1.1 and did not make it to version 2.0, because work on this version was stopped. Without Appendix C all current sites would be needed to be rewritten to XHTML 1.1 and developers and users did not like it. Also there was an strict rule, which did not tolerate any errors in markups or parameters. So for example if you did not put " around parameter, the page just did not display, instead of tolerant browsers behaviour, which just can handle it somehow.
This "all or nothing" rule makes to to think little bit about broken and non-valid code on pages. Yes its true, that if we wont be strict on nice code, there will be more and more pages, but how to make some compromise? Because from developers point of view one has to optimize its site for different browsers in many cases, only because of browser dependant non-valid handling. So what about standardization of wrong code handling? Yes I know its very close to rendering engine and it will require big support from browsers site, but its kind of solution. Any other suggestions about this question is more than welcome.
HTML5: Up and Running
HTML5: Up and Running is a book about recent news in web development from Mark Pilgrim released by Google press. It is on of the resources which supports Google's initiative to push forward development and support for HTML5. I really appreciate this initiative, because it also allows me, to push some bony applications in IBM little bit further. So far I have some experience with HTML5 because I have implemented some of the features, which have google introduced in Gmail in some IBM product and I believe this book will help me to master my HTML5 skills and let me implement more features in this product.
Now little bit about the book. It`s price is pretty low (amazon $19), so I have decided to get it. I have obtain electronic version and in comparison to paper version is pretty more rich, you can use hyperlinks directly from text, what helps a lot especially, when you are not aware about some topics.
So far I have get to page 30, total number of pages is 222, so I hope I will make it through the book in most 2 weeks. I will bring you periodically updates about what I have learn and I hope I will help the community. For the moment I have learn how HTML5 arise and how to detect its features in different browsers. Updates about this 2 topics I will bring soon in my other posts.
HTML5 Learning Resources
Hi there,
I would like to share few resources, which I have gathered about HTML5 and also ask you, if you have any, to share it with rest of community. I hope this will help you.
First one close to IBM by Niklas Heidloff:
Usage of HTML5 Offline Functionality in XPages 8.5.2 :
Few talks from Google guys:
Introduction to HTML5:
HTML5: Features you want desperately but still can't use:
Learn About HTML5 and the Future of the Web:
Google I/O 2010 - Developing with HTML5:
Google I/O 2009 - HTML5 Database/Gears & Offline Web Apps
Book resources:
HTML5: Up and Running:
Introducing HTML5 (Voice That Matter):
Beginning with HTML5 and CSS3: Next Generation Web Standards
Friday, June 4, 2010
Drag and Drop in HTML5 and File Input. They have sth. wrong.

Hello everyone. At first, let me please say little background about recent events in my life, if you are interested only in technical stuff, skip this paragraph. Be unpredictable events it happens, that I am currently working on front-end of one web application for big big company. My role in team is not big, but I like my work and now I actually work on something pretty interesting. It is only 3 days what I am working with Dojo, Ajax, so please be patient with me. But as you can see I learn fast :-).
Let`s say something, what we would like to do today. As Google has started its Drag and Drop for Gmail, everyone wants to have one like that. So my BigB company has asked me to do also one like that for them. This is what I am working on in combination of Dojo, Ajax, HTML5 and classic HTML. Our task is like this: You have some form, there is some default behavior on this form and you would like to keep it, but also add some other. Thing are now like this, we have DOJO Fileinput and user can select there files and after submit of form they get uploaded on page. Now we would like to sth. like this. After dragging files on special div, we would like to add new Fileinput fields with those files in it. So no XHR request or sth. like this what is commonly used for uploading, we have to rely on script, which is processing form now and of course we can not touch him. So how to do this? There is a lot of limitations.
First of all, get working Drag and Drop, what is pretty simply task and even withou no knowledge of DOM or Ajax you can do it, I was able to do it, so you have to do it also. Follow this examples:
Get here until phase you would have access to you dataTransfer object. Now it is going to be little more complicated. First of all we need to put files to . To do this will help of new property of input DOM object and it is files. API is described here: http://help.dottoro.com/ljwjmspm.php. It is an Filelist object, and there are some problems with it, which I will mention later. Ok now, we have the files there and we would like also show names of files to user. This really could be problem with classic input, because value property is read only for security reasons, which are pretty clear. Using it could anyone download any file from your computer. So what to do now? Because we are using DOJO, there is one big advantage. DOJO Fileinput is little bit hack, and what you see is actually not an real file input, it is just text input and button, inside an file input. I know it sounds strange, but try to take a look on code in DOJO and you will get it fast. So now we just get this text input and we put there our file.name, great. We submit form, hoping that everything will go ok, and... PROBLEM!
Files added by user are uploaded without a problem, but files added to input programmatically are not submitted, so where the problem is? Could it be even done? So let`s take a look on documentation of Filelist, let`s play little bit with debuger and after a while we could find out, that our files property of input is allways 0?!?!. And this is pretty a problem in implementation of Filelist. Because, yes, you can access files with operator [], and this operator even accepts file to write into files, but it does not increase its length :-(. So on submit is nothing submitted. And what is worse, it is read only property, and there is no way how to change it. Just look on previous link.
This is pretty serious issue, and I hope, that in future implementations it will change, I would even report it to someone, if I would know to who. I can imagine, that there will arise a lot of more security and other issues, with allowing this property not to be read only, or by letting operator [] to set length. Other solution is to make operator [] able only to read, not write, but I believe, this would be step back. It is really nice help for developers. Especially, when you want to use file from other sources (DND, Web...). So how now solve this problem? On monday I am going try to write my own XHR request and override submit function, which is sending form. Will see, if it could be done, more info in part 2.
I hope, I have helped you at least a little bit. Have a nice day.
Subscribe to:
Posts (Atom)