Blog
Almost any Java programmer, who starts to study JS groking its OOP facilities and a dynamic nature of JS, thinks that they can be greatly improved and starts its own OOP library/helpers. Majority of them left forgotten when their authors learn more and more details and patterns of JS, yet some grow to fruition and being marketed. This article is dedicated to such people.
The goal of this article is to go over common OOP techniques suitable for JS, their pitfalls, problems, and trade-offs.
[Read more]
Many years ago I decided to replace plain text areas in Django's Admin with rich text editor, so I can edit HTML on my blog using WYSIWYG. Six (yes, 6) years ago I looked around and selected TinyMCE. Over time it turned out that I was forced to upgrade TinyMCE and the link script I had because new browsers continue breaking my rich editor editing. Finally it stopped working again in all modern browsers, and I decided that enough is enough. It is time to replace it. This time I settled on Dojo's Rich Editor hosted on Google CDN — simple, functional, less work to set up.
[Read more]
[See details]
This month I continued my presentation at ClubAJAX. Last time I did a survey of what is available in JavaScript, and concentrated on object-oriented (OOP) and aspect-oriented (AOP) techniques. This time I continued the survey, and talked about functional programming (FP), and domain-specific languages (DSL). And as promised I touched the code generation facilities too.
[Read more]
Today at dojo.connect I did a presentation "RAD CRUD": rapid
development of form-based applications. It continues my other
presentation "CRUD with Dojo", but it is more in depth,
targets Dojo developers, and contains some advanced material.
[Read more]
I was asked to talk about advanced JavaScript techniques at the last
monthly meeting of ClubAJAX — monthly get-together of
Dallas-area JavaScript programmers. Instead I ended up talking about
leveraging cool JavaScript features to implement well-known programming
techniques and paradigms: OOP,
AOP,
FP, and
so on.
[Read more]
[See details]
My presentation at ClubAJAX got off to a rocky start: I was let in the building 40 minutes after I was supposed to start the presentation. Everybody waited patiently. Thank you guys! As promised I publish slides along with relevant links (I had to skip most of planned demos).
[Read more]
Time to time I sync my blog software to the Django trunk and
introduce small enhancements. Some of them visible to my readers,
some of them are just for me. This time after reading Simon
Willison's post on rev=canonical I decided to add short URLs to my blog as well. This is a convention
to provide custom short URLs managing the mapping on your own web
site. In my opinion the idea is very cool.
[Read more]
Steve Yegge is one of the bloggers I read almost religiously. His posts are full of
insights on the software development topics and in general, and he is
always ready with an amusing anecdote from his rich life. His last post
Have you ever legalized marijuana? didn't disappoint either. The author explains "Shit's Easy Syndrome" (a
difficult topic even for seasoned bloggers) in a gay romp that takes a
reader from a light-hearted review of a book on "bugs in our mental
software" to hapless VPs to many technical difficulties of legalizing a psychoactive drug extracted from the plant Cannabis sativa. But the most entertaining and educating part is the incredible story of the author's life.
[Read more]
Explaining some dark corners of JavaScript, browsers, or Dojo for the 100th time I realized that I
already did it on numerous occasions, and some of my answers are published on public web sites. So I decided to round up the most general ones
I posted on StackOverflow and publish links to them here for a future reference.
[Read more]
As you may know today Google released Friend Connect.
I decided to give it a try. It took about 20 minutes to set up my blog
with 4 gadgets: Members, Sign In, Rate/Review, and Wall/Comments. It
took about 30 minutes to separate the skin from all these widgets, and
set up the Canvas so users can see gadgets in a separate window, if
they want to.
[Read more]
In the previous post we explored “array
extras” and how they can help us to write concise yet performant
and clean code. In this post we take a look at generalizing recursive
algorithms with recursion combinators — high-level functions that
encapsulate all boilerplate code needed to set up the recursion. These functions were added to dojox.lang.functional and will be officially released with Dojo 1.2.
In general the recursion is a form of
iterative problem solving in the same category as loops. There are
two major natural sources of recursive algorithms: recursive data
structures (lists, trees, and so on), and recursive definitions
(factorial, Fibonacci numbers, the GCD algorithm, etc.). The
recursion plays a prominent role in the functional programming (FP),
and one of the best articles on this topic is “Recursion Theory and
Joy” by Manfred von Thun, the creator of Joy (a purely functional
programming language with Forth-like syntax). Manfred's article
explains intricacies of recursion including the venerable Y
combinator, recursion combinators in general, and introduces a
practical set of recursion combinators, which will guide us in
this post.
[Read more]
If we look at the history of computer programming languages, we can see
that practically all new programming methodologies were about one
thing: taming complexity. The anarchy of earlier days of procedural programming (example: Fortran) gave way to structured programming (Pascal), which was refined with modular programming (Modula), and was reformulated when object-oriented programing went mainstream (C++, and much later Java). And it stopped there. The
focus shifted to different branches of computer programming, namely to
functional programming, and, to a lesser degree, logical programming.
The only major development in this branch was the rise of aspect-oriented programming (AOP) paradigm. Let's take a look at AOP in our favorite language:
JavaScript, and how Dojo helps the language with dojox.lang.aspect
package.
[Read more]
[Read more]