Tag Archives: javascript

GlassLayer : web app. to design & purchase plates online


www.glasslayer.com

Before reading rest of the article please check out the GlassLayer Web App. itself

Hi everybody,
Finally , i finished this web application i’ve been working for over a year. So i thought it would be a good idea to share my experiences and announce the application here on my blog. Application name has changed a few times along the way but final name is GlassLayer. I’ve made this web application for Glass Art Projects company located in LA. What they offer is that they give a kit of glasses , you glue those glasses on to a base glass as you like , it’s as simple as that and you get to design your very own plate. This was the traditional procedure but now with this new web application you get to design your own plate faster & cheaper.
Continue reading

Javascript Closures

I’ve been working on a web application project for about a year now.Seven months ago i switched to object-oriented javascript due to complexity of the project.It increased productivity in a way that i can not express with words , you just have to experience it.

As i switched to object oriented javascript i learned some new tricks in javascript that i’ve never needed or used before.One of them was closures.I dont think i’m yet an expert on javascript or its closures but i want to share my experiences with it. I perceive closures as parameterized callback functions that you can pass arguments into the function.

So when it becomes useful you ask?
It becomes very useful when you are using Jquery & OOP javascript together. Let me give you an example:

  • Content 1
  • Content 2
  • Content 3

This will not work as expected because second “this” pointer becomes current $(‘li’) element.
So how you gonna handle it?
You can fix it by editing it to:

$(this).html(obj.counter);

But wait that’s against OOP approach to assume object name is always going to be “obj”.I wish it was just that , but it will also make it impossible to declare and use more than one instance of that class in one document which can be solved by using seperate documents and showing them in one page within iframe elements.But dont you think it is quite unprofessional?

So that’s where we use Javascript Closures.By using a closure we can pass object pointer keyword “this” into “each()” function of JQuery.
for working example click : http://jsfiddle.net/C7yen/

  • Content 1
  • Content 2
  • Content 3

PS:
Some of the JQuery functions such as “.bind()” allows you to pass arguments.In those cases you dont need closures.But those functions are very few , maybe its only “.bind()” function , because it’s only one i know.

    ;
  • Content 1
  • Content 2
  • Content 3

Google DevFest Istanbul 2011

Hi everybody,

I was at Google Chrome DevFest today, it was great in a lot of way , it has been very educating and entertaining in the same time. We’ve been introduced to some of the amazing – yet beta – features of chrome browser. I’ve got to admit that if this features goes mainstream and gets support by more browsers , It is going to change the way we think of the web. The Web might become a whole lot better intuitive & fun experience with this upcoming features. Not only it will change the user experience , but also it will create new possibilities for developers. As an enthusiast Web App. developer , all i can say is that we have to spread the modern browser usage , we’ve got to get more users to upgrade their browsers to one of the modern browsers.It will not only ease the development process but also it will enrich the materials we use to develop web apps and im sure that this will accelerate the innovation in web.

Continue reading

What I’ve been working on so far…

Hi my fellow readers,
Here’s a little summary of the projects i’ve been working on lately…
Algoritms&Programming 2 Homework :: OpenCV Character Position Detection :
With OpenCV’s built-in Computer Vision Functions it has been very easy to develop a character position detection application.
Here is a screenshot from the application i made.


Algoritms&Programming 2 Homework :: OpenGL 2D Drawing & Mouse Input Handling with GLUT
Last week we were asked to make a simple application , using OpenGL & GLUT , that draws a 2d house and movable circle onto the screen.But that’s no fun for a real programmer.So i decided to make it a little bit fancy.Here what i’ve done.
I made a movable head instead of a circle and added hair.And i implemented a relation between hairs & mouse movement.If mouse moves more than a pixel at a render cycle.It calculates the projection of mouse movement on X & Y axis’ and uses those values to create a wind like effect on hairs.
I also implemented a relation between movement of the head and orientation of grasses.I also used the distance value , between head and each grass , which is already calculated to set color the color of each individual grass.As you move head closer to lawn it brights up the grasses with inverse propotional relation between h labelled distance and Green color value of the grasses.
Personal Interest :: Comet Programming with ORBITED & TWISTED
Continue reading