Recently in Development Category

Free Visual Basic 2008 Book

| No Comments

Visual Basic 2008 - Das Entwicklerbuch

Well this is rare: As Golem.de has reported today in this post, Microsoft offers the book Visual Basic 2008 - Das Entwicklerbuch written by Klaus Löffelmann published under Microsoft Press free for download.

In the spirit of Christmas, as it seems, have they decided to give you, for a registration, the bonus and additional material, which includes the source code examples, for free.
The book itself (unfortunately for all English speaking readers in German) is available for free and without registration.

Well, this is an old topic: web design is at least a topic since there are Cascading Style Sheets (CSS) or even earlier. Nevertheless do I want to present you some hints and tips from my point of view, what a good design for a business site is. This idea has evolved in my current background, as I have recently changed the company and my employer is also thinking about a relaunch/modernisation of his homepage. So this is the reason I have chosen such an outdated (or should I say evergreen) topic.

The idea behind this is to have at the end a series of blog posts, which cover different sites as they come into my mind and to evaluate the positive and the negative sides of a design.

I hope this will be an interesting series for my readers to follow me and that we might have some kind of discussion.
As a starter, I want to give a short introduction into the normal "process" of the creation or the relaunch of a business web site.

Well now as we have stored our images within the filesystem of the web server and the information in the MySQL database (see part 1 of this series), it is about accessing the files and the information.

Basically the needed steps are quite easy:

  1. Prepare SQL statements in your model for data
  2. Create Controller and View Template
  3. Create a View Helper Plugin to grab the image.

I will not explain in detail how to build the SQL statements respectively the functions in the model and how to set up the Controller and View Template. You will find other posts on this blog about this topic and with links to good tutorials

The task is simple: Let the user (or someone else) upload an image to your server and store it in a predefined location. Additionally you would like to store some information, e.g. an user name, an image title and a comment in a MySQL-Db. As an experienced programmer you will maybe take the Zend Framework.
To handle just a few images, this is no big thing. Make a Zend_Form and enable it to upload a file and store the information according to your model in the database. That is it.

Well thinking a little bit further you may think about the names of your files and what happens when there are two files (one on the server and one to be uploaded) with the same name. You have a conflict. To be more precise: without any intervention the newer file (the one to be uploaded) overwrites the existing file. You have to explain the user where the old image has gone and why there is another image twice in your database.

You have two solutions to this problem:
# Scan your directory upon validation if there already exists a file with this name (or maybe you have stored the filename in the database and query the database) and decide what to do: rename file or do not permit upload, e.g. return a false on validation.
# You can use own filenames based on a MySQL auto-increment value, e.g. the ID-Column which holds the additional information (user name, title, comment).

I will show you how to implement the latter solution. In a second tutorial I will show you how to access this files.

I am currently designing a website for a company and use the CMS TypoLight. A really nice tool, I like it. It produces clean code and you can easily do Search Engine Optimisation (SEO). SEO is by the way still an important aspect in development of websites.

But I have one little problem: The website should handle multiple languages. This is generally possible with TypoLight, as you can have multiple site roots in one installation and discriminate the user according to language settings from his browser. This gives you the right entry point, but not search engine optimised.

There are different ways around to do the language switch and so on. You find them if you browse the extension directory for the tag "language". However this is only considering the switch from one language to another, at least in most cases. But what I want is a way to show on one hand the user, which languages he is using in the URL and on the other hand to the search engine, that it will index all my pages.

Beginning to Code on Mac

| No Comments

I have some time ago, already looked at Objective-C and Cocoa, the framework from Apple, but never stayed strictly with my learning objectives. One reason was maybe that the book I have bought was based on an old version of XCode, this made it really heavy to follow the exercises.

Now I have some spare time and I started a new try. With other tutorials and the right books for my version of XCode. But I had to recognise soon, that I have first to read some basics about the programming in C or Objective-C before I could go on with the book about Cocoa.

The management of a database is most of the time, just a routine task. The responsible has to monitor most of the time the database, its transactions, the backups and the server capacity. Sometimes one needs to correct something or just look up a query and ... There are many exceptional scenarios. My focus in this small report is on the beginning and the end of the life cycle of a database: Designing the tables (and testing it) as well as migrating a database (to a new release for example).

Coming from the web design/development the tools I want to use should fulfill some requirements:

  • Support MySQL and SQL (at least)
  • Support remote connections (ideally with SSH)
  • Run on Mac OS X
  • Cost nothing (at least if I do not use the tool on a regular basis)

On the basis of this selection criteria I have found two free tools. One of the do I use now on a regular basis, the other one is not that great (yet) and I do not use it any more.

I have already written here about the Dojo Editor. Generally this is a nice and clean Rich Text Editor (RTE), but with some deficits in the standard configuration. Two examples to this point: First the inserting of URLs respectively links is not enabled by default and second the inserting of images is not enabled either.

But this two options can be enabled quite easy. You can see a nice example of a quite good configured editor on this page here. The corresponding article for the how to is found on the page of rubicorp.com

There have been other articles around about the usage of the Dojo editor element in Zend Framework. The solution by Weier O'Phinney has been to write a view helper and use the editor in this way.

I have also started to use the Dojo components for my application and have been wondering how to access the editor, since I wanted an editor for my article bodies. So I looked a little bit around but found only the solutions which required to write own Javascript-functions and needed additionally hidden textareas to store the content respectively to access the content.

DijitEditor.png

At the beginning of this term at the university I have subscribed to a project about the Semantic Web and Service Sciences. A really interesting topic, indeed. But this is not the main topic of this article, even though this course led me to think about how to crawl the web with a Java application (because the project leader, in other words the professor, has already had some code written in Java).

So then, I started with my basic skills of Java coding, to look around. Fortunately I already knew a little bit about crawling and that regular expressions are key in this area from my experience with PHP and libcurl.

Looking around in the web I (or should I say Google has) have found a good point to start with from Osborne (a unit of McGraw Hill) where the Book "The Art Of Java" from Herbert Schildt and James Holmes has been published. So I started to read the article Crawling The Web With Java.