Gal Segal's Blog

Thoughts of a programmer with a soul

Posts Tagged ‘JS’:

Jan 24

Extended Breadcrumbs Navigation



Breadcrumbs are a familiar way for navigation in many websites. They are used to show to user the viewed page in the hierarchy of the website. One thing breadcrumbs are limited to is that they only support upwards navigation, meaning, you can use them to go up in the hierarchy, but not sideways or dig deeper.

In my work, I had to come up with a solution for this limitation: I had to use the breadcrumbs for showing pages that are in the same level as the viewed page, as well as the next level. So, this is what I came up with.

Continue reading...
Jan 2

Javascript Library Neutral Pub-Sub



In the past few weeks I’m trying to create a lean JavaScript infrastructure. One of the ideas that came to my mind was the notion of “Pub-Sub”: the ability to subscribe to some event that fires from one module, and react in another module, without these two modules should know about each other.

Of course, this is not a new idea, and if you read my post about the JavaScript Modules Infrastructure, this is another approach to the same problem: how to manage a large scale web application with a lot of JavaScript involved.

Continue reading...
Dec 19

Javascript Modules Infrastructure



Working on website with a lot of JavaScript code can be somewhat challenging, especially if most of the functionality comes in the form of Ajax. We see a lot of best practices for building individual plugins, creating private methods and members, and exposing a public and consistent API outside. Finding some tips about managing several plugins or modules together is a little bit harder. I needed some mechanism that will help me control the creation and manipulation of JavaScript modules, and after some digging I decided to write it myself.

Continue reading...