Archive for the ‘Web Development’ Category

Web Development: Reinventing the Flat Tire

April 29th, 2014 2 comments

The Dynabook is the holy grail of computing. It is the platonic ideal of a computer, whose purpose is “to provide computer support for the creative spirit in everyone” (Design Principles Behind Smalltalk). Yeah! I want my creative spirit unleashed :) Are you with me?!

But how do we get there?

We attack from both sides at once:

  • Education – have computing be as natural as pencil and paper from a young age. And we mean individual creation, not the dependent-consumer model of the iPad, where you can do only what other developers implement, and Apple approves. While the iPad looks like the illustrations from the original Dynabook paper, it is actually the Anti-Dynabook. Much like places in the U.S. that have kept the original Native American names after stealing the land, it adopts the form while betraying the meaning
  • Distillation – if we’re going to invent the future, we need to understand where we are now. Unfortunately, if you wrote the code of the average computing system (i.e. the OS plus and office suite) in books, they would stack the height of the Empire State Building. People (especially old people) feel stupid because they don’t understand computers. I feel compassion for them, but still have to chuckle and say, “don’t worry, neither do the developers at [Microsoft/Apple/Ubuntu]“. If Leonardo Da Vinci were a Microsoft engineer, he would not be able to understand how windows works. Computing in its present form is beyond human potential to understand!

This post will briefly look at the second point, distillation, as it applies to web development.

Why Simplicity Matters

We each have a limited amount of mental RAM, or working memory, with which to create. Less is available, the more complex and indirect our technology stack is…

See we’re here already. It’s assumed that you need to have a “stack” – WAMP, LAMP – an operating system, a database, programming language layered on top, often with a run-compile cycle, probably with tools (e.g. the compiler) written in another language, often glorified text editors as IDEs.

We must reduce the cognitive burden of the technology so that there is enough mental RAM left over to create.

The Vision

If you go back to the original intentions of Morphic from the Self world, the vision was:

  1. Find – physically, visually, find an object (notice, it’s not “find a class”) that looks like/behaves like I want
  2. Copy – again physically, visually, directly, by clicking the original object and dragging the copy away
  3. Tweak – the object directly, not in desiccated file form in a text editor, until it does what I want it to do.
The Reality

This is totally lost in even the best web workflow:

  1. Find - say a Bootstrap template
  2. Copy – find all the necessary HTML and CSS files, which might take a bit of investigation into where they all live
  3. Tweak – If it didn’t seem too bad yet, this is where the wheels really fall off. Edit the raw HTML and CSS files, then if you’re really trendy, click refresh on the browser window you have open parallel to your coding window and see things refresh. WTH?! Where did the objects go? You just cut your extremely limited mental RAM at least in half by working with your objects (forms, buttons, links) in the equivalent of web assembly language, and repeatedly switching contexts.
“Not As Bad” Is the New Better

You say, “I’m tired of programming in assembly in a text editor! Viva la Revolution! Instead of settling for a language piled on top of the manure heap, I’m going to use a live, dynamic environment like Amber or Seaside“. Well kudos! If the Dynabook was our ideal of 100% efficiency and most web technologies are 10%, you’re now at 30%, so you can whip the heck out of your competition.

But, and just indulge me here for a second, what if we’re not satisfied with being the one-eyed man in the land of the blind? What if we were interested in going beyond what’s better exploring what’s possible?

Even writing HTML with a nice DSL in Amber or Seaside, is a non-WYSIWYG run-compile-like cycle. It’s more like programming with punch cards than the live, direct universe hinted at by Self, Sketchpad, Squeak/Pharo, and Croquet.

Hints at What’s Possible

Ivan Sutherland had WYSIWYG (among other things, like constraint solvers) down with Sketchpad in 1963.

Morphic was another powerful attempt. In a Morphic system, if my code editor doesn’t work the way I want, I can drill down into it – without leaving my uniform dynamic environment of live objects – and make it so (theoretically, this is becoming less true with e.g. Spec, which hides the live objects under layers of hopefully-cross-ui-platform-compatibility *).

Here’s a good example of my initial excitement about Morphic. One of my first favorite examples of using Pharo was that creating a new repository in the Monticello Browser (a version control GUI tool) always started with IIRC the image (current) directory, and I have a folder under which all my local repos live. I brought up halos on the “new repository” button, then on the Settings browser, connected the two together, and submitted the fix in a few minutes with 0 context switches… and I was hooked on Smalltalk.

Of course, Smalltalk is just a step on the path toward the Dynabook, albeit the top step to date! To really blow your mind, check out VPRI’s work to build a complete computing system in 20,000 lines of code – about the size of a good novel! Here’s the original NSF proposal and the last published annual status report (still waiting on the final one)

* One of the funny (or sad) thing is that people keep developing UI Builders for Morphic – that’s what Morphic is. The question isn’t how to layer tool-centric crap on top, but how to directly play with the Morphs themselves (remember flaps?) until you have what you want, and then reify that. It wouldn’t be so hard (at least for geometry and layout) to implement “aMorphThatIBuiltViaDirectManipulation reifyAs: #MyCoolMorphSubclass”.

The Challenge

How do we interact with a cool Bootstrap login form as I did with the Browser above – directly, as a live object? How do we dig in to the web, find the live objects, and bend them to our vision, without leaving our live, dynamic, open, turtles-all-the-way-down system? I would love to live in that world.

Smalltalk Simple Image-based Persistence

May 30th, 2011 5 comments

In an enlightening blog post, Ramon Leon explains that most applications are designed for small businesses with small amounts of data. Therefore most applications will never have to scale (i.e. become the next Twitter), so a relational database is overkill. However, persisting by simply saving the image is slow and error-prone.

Based on these ideas, he suggests a simple (one class) framework which saves only your model. The idea is to use it as long as you can get away with, which may be forever.

I packaged the code from the post, added a few tests, and put it on SqueakSource as SimplePersistence.

It’s really easy to give your application persistence (see SPFileDatabase’s class comment). The three steps are:

  1. Subclass SPFileDatabase
  2. On the class-sode of the subclass, implement
    • #repositories – returns a collection of objects to be saved
    • #restoreRepositories: – gets passed back the collection.

That’s it! Now, whenever you want to save, call class>>saveRepository or class>>takeSnapshot (background save).

Categories: Programming, Smalltalk, Web Development Tags:

Wt Web Toolkit on shared litespeed host

April 13th, 2009 No comments

As excited as I was about wt, I was equally worried that I would not be able to get wt set up correctly since I use a shared host.  

First, shout out to for all the support.  They use litespeed, for which there seems to be no setup instructions online.  

We finally got it going by:

  1. adding the Wt app as a FastCGI “External application” in litespeed’s admin interface
  2. then /path/to/relevent/folder/under/webroot/.htaccess: AddType application/x-httpd-[insert name of ext app here] [insert file extension]

I would prefer to use a SetHandler instead of the dummy file required by AddType, but I’m really splitting hairs now – it’s working, so I’ll put it on my list of things I’m not doing now and start coding already!

UPDATE: The above approach is unworkable because:

  1. My shared host uses Apache configurations (not the Litespeed admin console) to set up virtual hosts
  2. In it’s current version (4.0.1), Litespeed does not support Apache configurations for FastCGI (Litespeed support said that they will be implemented in the next subversion.

What this means is that my app would be started by the Litespeed web server under its user and group IDs, not suExeced like PHP or CGI apps.  Because I do not own the process, every time there is a problem with it (or I update the binary), I would have to contact customer support and have them manually kill the processes.  Obviously, this would not work.

However, it doesn’t matter anyway because…

After several emails with Koen from Wt, I found out that, for a public site, they recommend using the built-in wthttp server with the public web server (e.g. Aapche) as a reverse proxy.  I can not do for the same two reasons – my hosts method of virtual hosting and the limits to Apache configurations in Litespeed (in this proxy configs)

So, I’m switching to one of my host’s servers with Apache, which can easily be configured as a reverse proxy with wthttp (the user will communicate with Apache, which will forward all requests to wthttp, without the user ever knowing that anything is going on behind the scenes).

Categories: Web Development Tags: , , ,

wt Web App C++ Library

April 7th, 2009 No comments

I love the idea of the wt toolkit: create an application, just like any desktop app.  Then, use wt for the “GUI” which hides all the web technologies and automatically handles the communication between the web server and my app.  wt will determine the best way to display the UI compatibly with the user’s browser.

OMG!  I can use my existing C++ skills to create awesome web apps without wasting time learning the panoply of ever-evolving web technologies – AJAX, HTML, Javascript – all taken care of by people who know them far better than me.

Categories: Programming, Web Development Tags: , ,

HTML Tidy on Mac

March 27th, 2009 No comments

God bless free software providers.  But, oh how painful the installation!!  After slogging through outdated documentation, this is how to download HTML Tidy through cvs on the mac.

Fire up Terminal and enter the following commands:

  • cvs login
  • [Press Enter when asked for a password]
  • cvs -z3 export -f -Dnow tidy
Yay!  Now that you have the source…
  1. cd path/of/installed/source
  2. cd build/gmake
  3. make all
  4. sudo make install (I changed the include dir in the makefile first)
Categories: Mac, Web Development Tags:

MySQL++ on Mac using MAMP

March 11th, 2009 No comments

Typical install… like there is such a thing!  I sat down eager to take MySQL++ for a test-drive, so I opened up a few Safari tabs, shuttling between the MySQL and MySQL++ sites (the library has been taken over by a caring individual), and sipped my large glass of water.  Everything went along smashingly until configure complained that it couldn’t find the MySQL library and include files.  Oh yeah, I’m using MAMP, so I don’t have any!  This was the solution:

  1. Download MySQL++ from here.
  2. Unarchive MySQL++.
  3. Download closest compatible MySQL version (5.0.77 at time of writing) here.
  4. Unarchive MySQL
  5. Open a terminal window
  6. cd /path/to/MySQL++
  7. ./configure ./configure –with-mysql-lib=/path-to-wherever-you-unarchived-mysql/lib –with-mysql-include=/path-to-wherever-you-unarchived-mysql/include –prefix=/path/where/you/want/mysql++/installed
  8. make
  9. sudo make install
  10. Revel in installation success

Update: when I tried to build and run one of the sample programs in xcode, I got a “Signal 10″ bus error – but only in debug builds (release were fine)!  After an hour lost in the www woods, I started manually flipping all the target settings that were different and found that the preprocessor macro “-D_GLIBCXX_DEBUG=1″ was the problem.  Of course, once I knew what I was looking for, I found it in two seconds on the web.  You can read a more detailed description of the problem here.  Once I removed the macro, all was well.

Update #2: the library tries to find the mySQL server in the default location, not wherever MAMP’s mySQL server is.  One solution, which I found here, is to put a symbolic link in the place where the library looks, which points to the real file in MAMP.

Categories: Mac, Programming, Web Development Tags: , ,

Accessing documents outside the web root in Apache using mod_rewrite

March 2nd, 2009 No comments

I’ve been wanting to keep a CGI script outside my web root (for security), but still serve it on my site.

The problem:

  • I’m on a shared host, so I have no access to the server config files (if I did, an ScriptAlias directive would be the move)
  • RewriteRule directives in .htaccess files will not serve documents outside the web root
  • SSI is not implemented correctly on my server (actually running litespeed), and is recommended for small code insertions anyway.

After days of mailing list and forum posts, always seeming right on the edge of success… Arrrggghhhh!!!!

The solution?

  • Put a symbolic link to the script (which does not contain any of the sensitive data) in the directory with the .htaccess file
  • In .htaccess:
    • Options +SymLinksIfOwnerMatch # tells Apache to follow the link
    • RewriteEngine on # enable URL processing via mod_rewrite
    • RewriteRule ^(.*)$ scriptname?$1 [T=application/x-httpd-cgi] # pass the path_info requested (everything after the hostname) as a query string to the CGI; and handle it as a CGI script (T=…)

And, voila: script outside web root served!

I hope this saves someone else the frustration!

p.s. the minimum permissions to make this setup work are:

  • Script, link and .htaccess: 604
  • Script directory: 701
Categories: Web Development Tags: , ,

windows 7 product key

windows 7 product key

windows 7 key generator

windows 7 key generator

free winrar download

free winrar download

winzip activation code

winzip activation code

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

winrar download free

winrar download free

winzip free download full version

winzip free download full version

windows 7 activation crack

windows7 activation crack

windows 7 crack

windows 7 crack

free winzip

free winzip