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:

<ul>
<li>Content 1</li>
<li>Content 2</li>
<li>Content 3</li>
</ul>
<script>
obj={
counter:1,
set:function()
{
$('li').each(function(){
$(this).html(this.counter);
});
}
}
</script>

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/

<ul>
<li>Content 1</li>
<li>Content 2</li>
<li>Content 3</li>
</ul>
<script>
obj={
counter:1,
set:function()
{
setF=(function(ev){ return function(){ $(this).html(ev.counter); } })(this);
$('li').each(setF);
}
}
</script>

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.

<ul>;
<li>Content 1</li>
<li>Content 2</li>
<li>Content 3</li>
</ul>
<script>
obj={
counter:1,
set:function()
{<code></code>
$('li').bind("click",{context:this},function(ev)
{
$(this).html(ev.data.context.counter);
});
}
}
</script>

Social Network 2.0 : Interconnected Social Media Servers

Today, when you hear Social Network the word , I am one hundred percent sure the first thing showing up in your mind is Facebook.To understand social networking , lets pick Facebook as the subject and revise its basic functionalities which makes it what it is. I’ll call everything we share as “data” , posts, personal, photos etc.On Facebook we share data , an enourmous amount of data.It is your own data that you can control.Well.. that’s true until you publish it. It is not a rumor anymore that Facebook keeps lots of your data even after you deleted it. The Privacy Issue , this is just one the subjects that lead me to this new idea. I’m not going to dig into this issue because I think you are already aware of it and there is also a lot already written about it.
The Second Issue is about how much flexible it is.Its look , Its UI… but wait there is nothing flexible there. You may ask why should there be , you may say it’s the simplicity and the standart look that makes it what is.Well the option to keep it in the standart look should remain.But there should be a way to design your own Profile UI or change the Text Input system maybe to TinyMCE or someother rich-text editor. It started to sound like WordPress right? Well, I think WordPress can be a great example for social network on  Flexibility. Not only the flexibility it provides in user interface but also the way it handles your data.
The way it handles your data we said, This is whole another issue , Unless you develop a Facebook app. you can not share your data free from preset standart. It has got to be whether a text, image , url or video. These data types might sound like about everything you can share on web but what about.But what about richtext that you can format with html tags etc. , Wouldnt it be great if we can format the status updates however we want, maybe with CKeditor or TinyMCE?

Continue reading

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

Arduino Ethernet Shield has arrived.

Hi fellows,

Last week , my delivery – the arduino ethernet shield – from Farnell has arrived. I was totally excited about it but i didnt have much time to play with it last week because i had visa exams.Finally , yesterday i had some time to play with it. I tested some of the example source codes on it and i have to admit that it was dead easy to set up & get to running.There is a plethora of source codes available for the shield , not just source codes but also lots of demonstration videos of what others made with it.This – The Sharing – is one of the reasons i love Arduino Community. A community of makers and enthusiast those help each other . It is a community where imaginations come alive and get in touch with the physical world in a collaboration and im grateful to be part of it :P
Continue reading