Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

Reinventing the routing in React apps

posted in JavaScript on 2021-01-18   router react navigo

The router is the backbone of your application. Trust me, that's how it is and I can prove it. One of the fundamental ideas in Web is the URL (Uniform Resource Locator). Or the way of how we very often call it - "web address". No mather what you are building there is a web address which identifies your resource. The router is the front office that accepts the request to particular URL and wires it to a logic. Logic for generating HTML or JSON response or something else. So, the router is very important part of your system.

At the end of last year I rewrote one of my favorite projects - a vanilla JS router called Navigo. I was procrastinating this work for years. Finally I did it in TypeScript and wrote 100+ unit tests along the way. This refactoring opens the door for new features and more importantly, for integrating the library into other places. Like React for example.

read more

Deep dive into client-side routing

posted in JavaScript on 2016-01-03   router javascript navigo routing

(This blog post is inspired by A modern JavaScript router in 100 lines and heavily related to Navigo router project)

If you build single page applications you probably know that one of the must-have parts is the router. The bit that knows how to tweak the content of the address bar and notifies the rest of the system for URL changes. In this article we will discuss the various aspects of the routing in the browser.

read more

Apache .htaccess for HTML5 push state manipulations

posted in Architecture on 2015-12-20   dev krasimir navigo home dev krasimir http home dev index html html http home index html http browser routing

This is a quick post so I document my two hours research. I'm working on a open source library for routing in the browser. Or in other words JavaScript library that uses the history API. The thing is that locally I'm using Apache as a dev server and I wanted all the request to specific folder to be redirected to index.html.

read more

Testing responsiveness

posted in HTML5 on 2014-05-14   width content viewport device browser panel nav href chrome

We all know what responsive means nowadays. We, as developers, normally develop responsive applications. There is a dozen of instruments helping us achieving our goals. Some of us use extensions and even pay for them. However, I'm using one thing - Google Chrome browser. In this article, we will see what the Chrome's capabilities for testing responsiveness are.

read more

A modern JavaScript router in 100 lines

posted in JavaScript on 2014-02-21   router javascript navigo match history node

(The router here is now placed in its own project - Navigo. There is also another article Deep dive into client-side routing which you may find interesting)

Nowadays the popular single page applications are everywhere. Having such application means that you need a solid routing mechanism. Frameworks like Emberjs are truly build on top of a Router class. I'm still not sure that this is a concept which I like, but I'm absolutely sure that AbsurdJS should have a build-in Router. And, as with everything in this little library, it should be small, simple class. Let's see how such a module may look like.

read more

iPhone and iPod detection under JavaScript

posted in JavaScript on 2013-03-29   iphone ipod navigator useragent match

A little code snippet for detecting iPhone or iPod. You can easily edit it to match iPad.

read more

Dependency Injection in PHP. Create your own DI container.

posted in PHP on 2012-05-12   class key view show arguments array content navigation title skills

By my opinion one of the biggest problems in programming are dependencies. If you want to have a good well written application you should avoid dependencies between your modules/classes. There is a design pattern which could help and it's called Dependency Injection (DI). It allows you to inject objects into a class, instead of creating them there.

read more

Great review for krasimirtsonev.com

posted in Other on 2010-09-27   site navigation simple link clean column tim martinez background work

Special thanks to Tim Martinez for his review in HumberInteractive.com.Tim Martinez:"The site I chose is the portfolio site of Web Designer and Developer, Krasimir Tsonev.When you hit the site, right off the bat you’re presented with a simple pre-loader and then up comes the navigation. I like the navigation because it starts off centred and one column. I like that the focus is on the navigation and it’s just so clean. The menu has a large font and is easy to read, plus you get a cool rollover. Now when you click on something in the navigation, it gives you what you want right away. When you click on “Work”, then the navigation shifts over and you get a two-column thing going on. The second column then has the submenu items under Work and you get sweet rollovers again. The site’s functionality is very simple. The site’s layout is just so simple. I like it.

read more

Creative navigation by Hellomonday.com

posted in Inspiration on 2008-08-22   hellomonday site creative navigation gudrun og gudrun flash drawing api www red issue navigate trough minus good sites guys
read more