Showing posts with label web programming. Show all posts
Showing posts with label web programming. Show all posts

iPhone SDK delayed?

It's beginning to look as though the iPhone SDK may not ship this month since Apple has been silent about it. It was supposed to ship by the end of February. Of course this doesn't really have any impact on Run BASIC since it will not use the SDK, but it will produce apps that run in the iPhone's Safari web browser.

We haven't talked much about our plans for iPhone support in Run BASIC. We should have more to say in the next month or so.

Taking the Arc Challenge

Paul Graham, a very famous Lisp programmer who is well known for his continuations based web framework has invented a language called Arc (a version of Lisp). He came up with a challenge to see how others would implement a trivial web program in their favorite language.

Here's the Arc program:

(defop said req
(aform [w/link (pr "you said: " (arg _ "foo"))
(pr "click here")]
(input "foo")
(submit)))

Follow this link to see other submissions in different languages. Scroll down to to bottom to see the Run BASIC example. http://arclanguage.org/item?id=722

Now tell me which language you'd rather develop web apps in. BASIC is the one. ;-)

Web programming in... Java?

I mean, why? Of course that's how I feel about any kind of programming in Java. I recently found a blog where someone reviewed Wallace Wang's Beginning Programming book which teaches Liberty BASIC. The blogger seemed to enjoy Liberty BASIC and then went on to say that we was planning to learn Java. I wish that those presidential candidates would promise to reform our educational system by banning Java from k12 schools. People who are just learning programming need something that gives them a tighter feedback loop like BASIC does. If the learning experience isn't at least a little bit of fun it won't benefit the kids. Period.

People who trash BASIC haven't tried modern versions. Even the old DOS QBasic has everything the beginner needs.

iPhone development - activation experience

Since we have decided to create some iPhone development features for Run BASIC I bought an iPhone for this purpose. I thought it would be interesting to post my personal iPhone experience.

So, I went to the Apple store. I said that I wanted to buy an iPhone, so the youthful Apple employee grabbed me a small black box from behind the counter and handed it to me. "Big day," he said with a certain air of importance. I thought that was a little over the top. I mean, it's a phone. I wasn't having a baby. My daughter put it well, "Maybe if he was going to give you the $400 phone for free it would have been a big day." Ah well. I suppose Apple store employees can be forgiven for drinking the corporate koolaid. ;-)

I told him that I was buying the iPhone because I am working on easy development tools for it. He didn't quite get it right away that I wasn't working on iPhone apps for people to consume, but a really easy way for anyone to create their own iPhone apps that run in the Safari browser. I explained more carefully and got a gratifying 'Ahhhh' response from him. Gotta work on that marketing message.

So I took the phone home and unpacked it. There's no manual at all. There really should be for that price.

Alright, I understand that you activate the iPhone using iTunes. I am a Mac user (and a PC user) so I thought I would activate the phone from my Mac. That didn't work. I needed a newer version of iTunes. No big deal. I downloaded and installed the latest. Still no good. Why? Because then I discovered that I needed OS X v10.4.x or better. What then dawned on me made me a bit angry. I was going to need to activate the phone using iTunes on Windows. I think that qualifies as mistreatment by Apple of its customers.

Okay, so now I upgraded to the latest version of iTunes on my Vista box. I plugged the phone in and activated it. It went smoothly from there.

I'll post more about the iPhone and our work to support it using Run BASIC in the days to come.

Debugging Run BASIC Web Apps

In Run BASIC's first release there is effectively no built-in debugger. Of course you can use print to log to the browser page or to a file, and this is no more or less than many other web scripting systems. We aim to do something about this in the very near future.

One of our users suggested that it would be good to create an inspector panel in Run BASIC itself and that we should add some reflection via an EVAL$() function that would allow arbitrary execution of BASIC code at runtime. We would probably also need to at least metaprogramming features like the ability to get information from the runtime like:
  • The name of the current context (ie. function or subroutine)
  • The names of all the variables and arrays in scope
  • The source code for the current context
  • A collection of objects that models the stack
  • Probably more stuff

While this sort of thing is possible I think that we probably will initially provide a high level runtime inspection panel that the programmer can show and hide as needed. This is BASIC after all, and it should be as easy as possible to use. The metaprogramming stuff is cool though. ;-)

Web Programming for Fun

There has always been a culture of complexity-worship in the programming community. Some people seem to think that the Internet is a good excuse to take this even farther. This takes the fun out of programming, and it scares a lot of people away from even trying it. We think that this needs to be pushed back against. One of our goals in creating Run BASIC has been to make web development so easy that anyone can do it. As a language designed to make programming simple, BASIC is an ideal platform for realizing this idea.

We need a culture of simplicity. The computer should do that hard stuff for you. For example web application servers manage user sessions and processes, and these are things that require special administration by an expert in most web systems. With Run BASIC, except for a couple of fields in the Preferences tab that let you configure how long the timeouts are for sessions and processes, you don't really need to know anything about these. It's all done for you automatically.

Or for example let's say you want to draw graphics? There are no add-ons that you have to locate, download, and install with Run BASIC. It's all built right in, and just a few lines of code can draw some meaningful graphics into your web apps.

It's easy, and it's fun.

Run BASIC - Zero Configuration Web Application Server

I found a blog post today that compared PHP with Ruby on Rails in terms of how much easier PHP is to install and configure than Ruby on Rails. Both of these systems are composed of at a minimum:
  • A web server (usually Apache)
  • A language interpreter for PHP or Ruby
  • And usually a database server

And this is a simplification. The user needs to install and configure these things which requires knowing about a lot of esoteric stuff. If you've never done this before, you can lose some of your hair. Unless you like pain, why put yourself through this?

If you want to create your own web applications, Run BASIC will install everything ready to run in one shot. http://www.runbasic.com/

Why do people put up with complex programming systems? Because for more than a decade they had much harder tools, so now they think PHP and RoR are easy.

Run BASIC Podcast Interview - Part 2

As promised, part two of the Run BASIC interview with James Robertson is now online. Amongst other things, we chatted about how web development is harder than it needs to be, and about the challenges of marketing something different because people's perceptions can be hard to break through.

http://www.cincomsmalltalk.com/blog/blogView?entry=3378296271

Enjoy!

-Carl

Java and BASIC - Simplicity and backwards compatibility?

Bruce Eckel and Joshua Bloch kick the can around about Java and complexity. Read about it here:

http://www.infoq.com/news/2008/01/java-evolution

I especially like this quote about Java and web development:
Web application development - this is difficult, and developing web applications with complex and underpowered technologies like JSP and JSF "is like eating soup with a fork"

I've been a Java programmer for 7 years. I've never liked the language. It always seemed to me to be much too verbose and controlling. It's amazing to me that it has been so popular, but that is more of a marketing accomplishment than anything else.

Run BASIC is a web programming system in development, and a really important part of what Scott McLaughlin and I are trying to do is to manage how the language grows. One important question to ask is how much emphasis to place on backwards compatibility as we more forward. Our goal is to create the best BASIC for the web, and it should still be simple and fun to use even as it becomes more powerful.

I invite your comments. :-)

Ajax and BASIC

Ajax (Asynchronous Javascript and XML) style techniques for building interactive web applications are the rage today. They are somewhat overhyped, but there is some value there.

Run BASIC already provides an exceptionally easy web programming system, but it does so with minimal special effects. There is a tiny bit of Javascript being used but almost everything is done with XHTML on the browser, and a very smart web application server.

In release v1.0 of Run BASIC the widgets (and indeed the page itself) are all objects. They are created by very simple statements. Any sort of Ajax inspired widgets for a future release of Run BASIC must not be any more complicated to use than the simple to use widgets that are already there.

Additionally, one of the most important aspects of Ajax is partial page reloading. This is important and we are eagerly planning to add this. What this will allow you the Run BASIC program to do is to reload a small part of your web app in the browser so that each user action does cause the whole page to be refreshed from the browser. This provides for smoother feeling user experience, and it also can improve performance.

So, Ajax must not complicate Run BASIC. Our design philosophy is to respect the simplicity of BASIC as much as possible. There are too many complicated programming systems out there, and the world doesn't need another one.

Moving Up From Web Design

Sometimes you will see people posting something like, "I've been creating web sites for years using HTML and FrontPage but I'd like to know how I can take the next step. How do I become a web developer?" Usually the answer provided is something like, "You should learn PHP."

Is PHP the answer? The answer is of course, it depends.

If you're just looking for a job skill you can put on your resume, then PHP may be exactly what the doctor ordered. But, if you are building your own sites or are doing custom work for a client, or want build something for use at the office, or if you just want to learn because programming interests you then you really should consider Run BASIC. You can get something going faster with Run BASIC than with more traditional web tools because Run BASIC is designed to be easy. It doesn't try to fit into the mainstream notion of a web tool. There are just too many of those.

Take a look at the site at http://www.runbasic.com/ for more information.

Web 2.0 Podcast Interview - Run BASIC

James Robertson interviewed me yesterday on his weekly podcast Industry Misinterpretations about our new web appserver Run BASIC, where he describes it as a Web 2.0 platform. I don't usually use that term, but I guess if the shoe fits...

The interview lasted more than an hour, and it was a great time. We talked a lot about how complicated programming systems are these days, and how badly we need simplicity to make a comeback. :-)

Listen to part one of the interview here:
http://www.cincomsmalltalk.com/blog/blogView?entry=3377692218

Part two will be posted next week.

iPhone BASIC?

Now that we've released Run BASIC, we would like to collect some feedback about the idea of adding some capability for the iPhone (and other mobile phones). There is a Javascript library and some CSS called iUi http://code.google.com/p/iui/ which provides the metaphor and visual look for iPhone (and iPod Touch) apps. This would make for very easy iPhone development, and it could be a great marketing button for Run BASIC.

Apple plans to announce some sort of SDK next month if I'm not mistaken, but a lot of iPhone software development will definitely still be web apps.

We could:

  • Work on this now
  • Work on this later
  • Encourage the RB community to integrate iUi by writing BASIC code

Perhaps the last option is the most sensible for now. Feedback is welcome.

Learn Web Programming

What does it mean to learn web programming (or web development) anyways? Most of the time it means that you need to struggle learning a programming language, a web server, and a bunch of frameworks. When I tell people that they can learn web programming with Run BASIC their automatic response (unless they're complete newbies) is, why not learn one of the popular web programming systems? Why learn Run BASIC?

I'll tell you why. Because you don't need a thick book with Run BASIC. Because you don't need to install a whole bunch of stuff. Because you can create a program and put it on the Internet in the blink of an eye with Run BASIC. Because you can think about programming instead of about trying to satisfy all the requirements of Apache+Perl, or PHP, or Ruby, or whatever.

http://www.runbasic.com/

Support for CSS class tags

In an earlier post I described how Run BASIC can use the DIV and CSS statements to style a web page. That works well for styling the different parts of a web page, but not for styling individual things on a page.

One new addition to Run BASIC is the ability to add a CSS class tag to an object on a web page, so that it can be manipulated.

For example the following would create a link and set a class to "button".

link #doMyBidding, "GO", [go]
#doMyBidding cssclass("button")

And the following statement would add the CSS needed to style the link (or any object that has the class tag "button"):

cssclass ".button", "{ put some css styling in here }"

Here is a link to a video demonstrating how this all works.

http://www.youtube.com/watch?v=1qomg67VdF0

Component Based Web Development

As a followup to the modules post I made a few days ago which is applicable to both Liberty BASIC and Run BASIC, Scott and I have created something very web specific for Run BASIC.

In addition to inserting graphics into a web page, Run BASIC's RENDER statement can now be used to insert a module into a web page. We have this in a rough state now. It does work, but we need to iron out a couple of things.

What is this useful for? You can now create different parts of your web application as separate programs. You load them in and render them into the page. You can also control them using their own functions.

For example you might have a blog application with different parts of the page rendered by their own modules:
  • BannerLogin
  • Navigation bar
  • Entries
  • Archive outline
  • etc.
Each component has it's own little virtual page which you can print to, embed graphics into, cls, add links and other stuff to, etc. The contents of the component are managed automatically. Only a RENDER statement is needed.

By using the DIV and CSS statements, the modules can be formatted on the web page in an attractive and useful way.

Check out this stream