a brief about me

My avatar
Fabio Zendhi Nagao

is an applied mathematician from IME - USP - Brazil currently working as CTO at Lojcomm Internet, a company specialized in e-commerce. + info

fields of interest: E-commerce, Collective Intelligence, Interoperability, Web 2.0, Web Design, Mathematical Programming, Pattern Recognition.

contacts: Twitter and nagaozen @hotmail.com, @gmail.com and @yahoo.com

out of date goodies

In order to help the large amount of people looking for my old widgets everyday, I'm putting below a list of the most wanted. Note that the others are still accessible at http://zendold.lojcomm.com.br/.

support my projects

If you like my free products and want to support their advancement, please consider making a small (or large!) donation or buying me a book from my Amazon wishlish.

Category : Framework

Aug 13th

Classic ASP Orderly compiler

Filed Under: ASP, AXE, Framework, Javascript, VBScript

I believe that with today's release the ASP Xtreme Evolution Framework reaches a real maturity to handle JSON. ORDERLY.ASP leverages the power of the Orderly descriptors to your Classic ASP application. Although it's bundled with the AXE, it's modularized enough to work alone for the Orderly.parse method, which returns the JSONSchema subset, or in ensemble with JSON2.ASP which enables Orderly.compile to stringify the JSONSchema representation.

The name behind this release is Zach Carter which made Orderly.js some months ago and keep updating the project since then. The only effort from my part was to document it in the AXE way and write some examples.

Here are some examples of how to use it:

Retriving the JSONSchema subset from an orderly source

<script language="javascript" runat="server" src="/lib/axe/Parsers/orderly.asp"></script>
<%

dim source : source = join(array( _
    "object {", _
    "  string name;", _
    "  string description?;", _
    "  string homepage /^http:/;", _
    "  integer {1500,3000} invented;", _
    "}*;" _
), vbNewline)

dim Schema : set Schema = Orderly.parse(source)
Response.write( typename( Schema ) & vbNewline )
set Schema = nothing

%>

prints:

JScriptTypeInfo
 

Checking the JSONSchema stringified representation

<script language="javascript" runat="server" src="/lib/axe/Parsers/orderly.asp"></script>
<script language="javascript" runat="server" src="/lib/axe/Parsers/json2.asp"></script>
<%

dim source : source = join(array( _
    "object {", _
    "  string name;", _
    "  string description?;", _
    "  string homepage /^http:/;", _
    "  integer {1500,3000} invented;", _
    "}*;" _
), vbNewline)

Response.write( Orderly.compile(source) & vbNewline )

%>

prints:

{
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "description": {
            "type": "string",
            "optional": true
        },
        "homepage": {
            "type": "string",
            "pattern": "^http:"
        },
        "invented": {
            "type": "integer",
            "minimum": 1500,
            "maximum": 3000
        }
    },
    "additionalProperties": true
}
 

Download & Source

Read More. 1 comment.

Aug 6th

Classic ASP JSON Revisited

Filed Under: ASP, AXE, Framework, Javascript, VBScript

UPDATE: Kate Osipova kindly made a Polish version of this article. Thanks Kate.

Hi everybody! I'm currently working on three projects using AXE (ASP Xtreme Evolution) Framework and because of their high dependency on JSON I've revisited the topic Classic ASP JSON support. The great news about it is that I found Troy Forster JSON2.ASP a really promising way to work with it. Despite the work being incomplete in terms of functionality, it used a really elegant way to READ the JSON in a fancy native looking way. Plus, the library was based on the Douglas Crockford json2.js meaning it's engine is really strict to the standards.

Because of the AXE philosophy of embrace and use the great ideas born around the world in a real collaboration environment of all languages, I felt really tempted to adopt the original work of the JSON author himself and augment the AXE Framework functionality with this little piece of gold. But I couldn't replace, also it wasn't a smart move in terms of compatibility, my old full featured JSON.ASP class with other that would restrict the freedom to manipulate the Javascript object by my own will.

And that's why I coded my own version of JSON2.ASP which instantly became an integrated piece of AXE. It provides all the functionalities from the Troy Forster work but goes beyond enabling developers to augment the object with booleans, numbers, strings, arrays (using ASP safeArrays notation) and even another objects. Plus I implemented a keys method in the Object.prototype which allows the enumeration of the object keys (this modification is fine and it's also standard in ECMAScript 5) which means that it doesn't matter in which language you are programming (Ruby, Python, VBScript etc) you can use the for each loop in same way that it's available for the language in ASP.

Here are some examples of how to use it:

Reading data from JSON

<script language="javascript" runat="server" src="/lib/axe/Parsers/json2.asp"></script>
<%

dim Info : set Info = JSON.parse(join(array( _
    "{", _
    "  ""firstname"": ""Fabio"",", _
    "  ""lastname"": ""Nagao"",", _
    "  ""alive"": true,", _
    "  ""age"": 27,", _
    "  ""nickname"": ""nagaozen"",", _
    "  ""fruits"": [", _
    "    ""banana"",", _
    "    ""orange"",", _
    "    ""apple"",", _
    "    ""papaya"",", _
    "    ""pineapple""", _
    "  ],", _
    "  ""complex"": {", _
    "    ""real"": 1,", _
    "    ""imaginary"": 2", _
    "  }", _
    "}" _
)))
 
Response.write(Info.firstname & vbNewline) ' prints Fabio
Response.write(Info.alive & vbNewline) ' prints True
Response.write(Info.age & vbNewline) ' prints 27
Response.write(Info.fruits.get(0) & vbNewline) ' prints banana
Response.write(Info.fruits.get(1) & vbNewline) ' prints orange
Response.write(Info.complex.real & vbNewline) ' prints 1
Response.write(Info.complex.imaginary & vbNewline) ' prints 2
 
' You can also enumerate object properties ...
 
dim key : for each key in Info.keys()
    Response.write( key & vbNewline )
next
 
' which prints:
 
' firstname
' lastname
' alive
' age
' nickname
' fruits
' complex
 
set Info = nothing

%>

Building a JSON

<script language="javascript" runat="server" src="/lib/axe/Parsers/json2.asp"></script>
<%

dim Info : set Info = JSON.parse("{""firstname"":""Fabio"", ""lastname"":""Nagao""}")
Info.set "alive", true
Info.set "age", 27
Info.set "nickname", "nagaozen"
Info.set "fruits", array("banana","orange","apple","papaya","pineapple")
Info.set "complex", JSON.parse("{""real"":1, ""imaginary"":1}")
 
Response.write( JSON.stringify(Info, null, 2) & vbNewline ) ' prints the text below:
'{
'  "firstname": "Fabio",
'  "lastname": "Nagao",
'  "alive": true,
'  "age": 27,
'  "nickname": "nagaozen",
'  "fruits": [
'    "banana",
'    "orange",
'    "apple",
'    "papaya",
'    "pineapple"
'  ],
'  "complex": {
'    "real": 1,
'    "imaginary": 1
'  }
'}
 
set Info = nothing

%>

Download & Source

Read More. 13 comments.

May 29nd

Projects are now on GitHub

Filed Under: Application, AXE, Framework, GEdit, Miscellaneous, Optimization, Plugins

github/nagaozen screenshot

Better late than never! From now on, all my recent open-source contributions will be available at my github.com account. The current projects are:

  • ASP Xtreme Evolution (my ASP framework)
  • Exuberant-ctags (updates to make it's ASP parsing better)
  • Gedit-* (a lot of good things for gedit)
  • GTKSourceView-2.0 (updates to add/enhance language.specs)
  • jquery-vs-mootools (this one is an interesting article I translated)

Although this blog isn't being informative and updated as I think it should be, I'm currently very active and developing a lot of things but not writing much about it. Watching my git account will help you to keep the track of the latest updates in my software development. Enjoy!

Read More. 1 comment.

Jan 18th

Logomark and Icons for AXE

Filed Under: AXE, Design, Framework, Standards

Almost a year has been passed from the first release of AXE and from that to today the project still haven’t it’s own logomark or icons to be used as faveicon. But today, I spent my morning trying to solve this issue. Look, I’m no professional designer, but did my best in this task and liked the result. For the icons I tried to make it compatible with the Tango Icon Guidelines to guarantee a good contrast for both dark and bright backgrounds. I would love to know what you all like or dislike about it. Here’s the final art:

ASP Xtreme Evolution logo

Well, about the new version of AXE, I’m a bit busy working on another project and have no time to polish it. But the enhancements are huge and I hope to have a new version in the next 1 or 2 months.

Read More. 1 comment.

Jul 15th

Textmate theme to Notepad++ styler

Filed Under: Application, ASP, Framework, Notepad++, Optimization, Server, Services

Everybody knows that when I’m at Windows my favorite editor is Notepad++. It’s an opensource source code ( opensource source code – I liked it! ) editor which supports serveral programming languages and has a bunch of interesting features like:

  • Auto-completion
  • Snippets
  • Multi-Document
  • Multi-View
  • Regular Expression Search/Replace
  • Plugins interface

Although it also support customized Syntax Highlighting there aren’t too many options available… But this ends today…

Read More. 10 comments.

Jun 10th

ASP Xtreme Evolution has been updated!

Filed Under: Application, ASP, AXE, Framework, Optimization, Server, VBScript

After some months working, finding and fixing bugs in the earlier version of ASP Xtreme Evolution, I’m proud to release the version 1.0.1.0. This is a very stable version. It comes with snippets to increase the productiveness and has some minor changes to help you to organize the code. I suggest those using the v.1.0.0.0 to upgrade as soon as possible. If you can’t upgrade, check the CHANGES in the Read More to fix your old version against the critical issues.

Read More. 8 comments.

May 16th

Tutorial: Starting with ASP Xtreme Evolution

Filed Under: Application, ASP, AXE, Framework, Mootools, Server, VBScript

One week ago Digitarald released the version 2.0 beta 4 of his very good FancyUpload component. Unfortunately I’ve noticed that many ASP and ASP.NET users were falling in trouble to implement it. In this tutorial I’ll try to cover the key things to get it working. I’ll be also using this guide to introduce new comers to ASP Xtreme Evolution development process.

Read More. 12 comments.

May 14th

A subversion system for ASP Xtreme Evolution

Filed Under: AXE, Framework, Optimization, Server

I’ve created a SVN for ASP Xtreme Evolution at DevjaVu so, everyone interested in this project can now use a subversion client like Tortoise to checkout the lastest version of the project. Users can also post new tickets and give suggestions through the trac. I hope that this initiative make a more Open Source face to ASP Xtreme Evolution Framework and make it ready for other developers to join the work.

Read More. 2 comments.

May 9th

Goodbye old school javascript

Filed Under: Client, Framework, Javascript, Mootools, Optimization

There are times in the life when you realise that the world has really changed and the things that was once so important to you doesn’t matter anymore. This is the case of my old dithered-extended quirksmode javascript library. It cost me years to enhance and extend but nothing more makes sense in a better standardized world.

Read More. 2 comments.

Jan 26nd

Meet ASP Xtreme Evolution

Filed Under: Application, ASP, AXE, Framework, IIS, Optimization, Standards, Server

ASP Xtreme Evolution

ASP Xtreme Evolution

This is a Classic ASP MVC URL-Friendly Framework based in some of the current best pratices like:

It also provides support for missing features that is commonly required:

  • Image manipulation
  • JSON support
  • Upload management
  • Zip management

Read More. 1 comment.