Archive

Archive for August, 2008

Tutorials in Routing in Rails 2.0

August 29th, 2008 admin No comments

Developing Java with SAP MaxDB Database – Part 1

August 27th, 2008 admin No comments

SAP MaxDB is a relational database that provides functions for creating, using, and managing databases and the software comprises the database kernel, tools, and interfaces.

SAP MaxDB has its own JDBC Driver which we can used to execute SQL statements with Java. It is a JDBC 2.0, that you can find on the following location of the installed MaxDB JDBC driver file at:
\runtime\jar\sapdbc.jar . For instance, when I installed on my local machine I did it on the following location:
D:\sapdb\programs\runtime\jar
The java class for the JDBC drive is the com.sap.dbtech.jdbc.DriverSapDB

Well, that enough for today. On the next
Kind regards

SAP MaxDB Database is like Phoenix Bird

August 27th, 2008 admin 1 comment

All:

Due to the acquisition of MySQL by Sun, from October 5, 2007 MaxDB returns to be maintained by SAP again. This is an important news in two senses, on one side it is sad since mysql and maxdb have always been my favorite databases and having both supported by the same team was something that pleased me a lot.

But now situation have change and although I am going to still using mysql for many of my projects, I have decided to give some support to this database as well apart from the one that SAP gives to it on its own developer’s web siteand in itsown wiki site.

To make a little bit of history and put everybody in context, this is a open source project SAP launched in order to compete with its biggest rival Oracle on the database market. If the database was previously acquired from another vendor that something I do not know. Codename as sapdb it was released 7.3 and 7.4 versions.

In 2004, not having the sucess expected, they decided to handle this project to MySQL AB at the same time that SAP Ventures (SAP Venture Capital company )takes a participation at the company. They changed the name to MaxDB and together with MySQL AB, they launched around to 2005 the MaxDB 7.5. This project was meant to be an Open Source Enterprise Database alternative to Oracle for companies using MySQL for small applications.

As we said before, since SUN has acquire mysql, the MaxDB support has returned back home to SAP as it is going to be used by the german software company as an alternative for its clients to comercial databases.   Additionally, it is going to be used by SAP as the database of choice for its SaaS software, called, at least today, SAP BusinessByDesign. Obviously, considering it is no being yet launched this name will obviously changed in the future.

What will be future of SAP MaxDb now that it has been separated from mysql, some will say not very good, on my opinion that I have been working with SAP products for almost 10 years, it’s life it is about to begin. One I have learned from SAP is that never quit an idea. It will change names, strategies, versions, but if they believe they need to launch a database. Do not worry, it will take 20 years but they will make SAPDB, MaxDB , SAP MaxDB or whatever name leader on the database market.

Kind regards

Categories: sap, sap maxdb Tags: , , ,

Create an AddressBook 1

August 26th, 2008 admin No comments

Hi All:

One of the things I dislike most of Open Source Applications, it is that are very difficult to continue since the code and way it is built, also it does not cover components; instead of building new entire application I would like to see how to build small reusable components which could be integrated on new applications. Today, we are going to explain how to create a slik “address book”.

1) Create the rails project:

As I am a fan of mysql database, I do create projects specifically for this database with the sentence:

rails -d mysql addressbook

2) Create main objects:

The base of the addressbook is the contact object which we are going to scaffold:

script/generate scaffold contact firstname:string lastname:string lastname2:string phone_id:integer address_id:integer photo_id:integer page_url:string title:string company_id:integer email_id:integer background:text comments:text author:string

As you can see the Contact is compound by other objects such as phone, address and photo. These objects are formed by several characteristics:

  • firstname
  • lastname
  • lastname2 – For those countries where a second last name is used
  • phone_id – Each contact can have multiple phone which forms an array of values
  • address_id- The address could be multiple and build on an object with an array of values
  • comments – It has an auto-complete feature

3) Create authentication:

We are going to create the authentication, so only authorized users can access to the application

script/generate scaffold user userName:string firstName:string lastName:string alias:string email:string password_salt:string password_hash:string

4) Setup the database:

We open the database.yml file where we insert the password of the root user or if we have leave it blank as default we do not have to enter it. In order to look it, install a mysql administration tool. There are plenty on the Internet.

We execute the rake command to create the database

rake create:db:all

And we create the first migration

rake migrate:db

Now we have created the contact object on the database.

On next chapter, we will create the rest of the subornidates objects and we will add plugins.

MacOS X Ruby on Rails Development tips I

August 14th, 2008 admin 1 comment

We open a set of posts dedicated to mentioned Rails development tips or tricks which are often found in several articles:

1) Open several instances of a webrick server from the command line on MacOs X Leopard :
This article is based on a similar tip provided for Windows OS by Mr. Arjun Ghosh. It is basically the same.
a) I open my Terminal app
b) I access to my rails application directory (previously created) which is created on my Library directory:
cd library/rails_apps
c) Then, we access to each one of the applications we want to open in webrick: We open the first server with the typical sentence:
/script/server
and then if we want to open another application, we access to the application:
cd
/script/server -p3001

2) Scaffold Rails 2.0

Clearly, I do not understand this scaffold change on the Rails 2.0 version, it has changed one of the features I enjoyed most from Rails which was a great dynamic scaffolding, and also the possibility to scaffold a model and a specific controller. I understand that it is being done to obtain a more Restful approach on the models and on the controllers, but sometimes is a pain.

Not long time before the appearing of Rails 2.0, I had the brilliant idea of buying last version of version of the Rails book which obviously have all example written in Rails 1.x version. For that reason depot example is no longer valid.

As Mr. Arjun Ghosh mentioned on his comment before there is a new edition of “Agile Web Development with Rails” coming out soon. (See reference)

Enough for now
Regards

A Michael Wesch Lecture

August 1st, 2008 admin No comments

Inspiring, revealing what to say about this lecture from Michael Wesch called “A Portal to Media Literacy”. I have watched several time this thought-provoking lecture and each time I watch it I found something different that makes me think how mass-user content providing , or what it is called more generally web 2.0 could slowly turn up-side-down how knowledge and knowledge jobs are made today.

He has did it again after creating a video about web 2.0, which not only really explain very well what the whole concept is, but also its visual language has inspired other videos about technology.

Although the lecture is about how web 2.0 tools and media could revolutionaize learning and classroom work, it is also talking about something else, it goes beyond to learning environment and it could influence other environment such as research, consulting or product development where knowledge is main asset.

Tools presented on the video are interesting and but the best are the reflections, concepts and the best practices which could be interfered from the video. How interesting could be to apply these concepts to consulting, and how challenging at the same time. Could you imagine to apply these methodology to our behemoths (companies) currently on the markets.

There are in fact companies such as Accenture which are creating their own wikis, blogs, social bookmarking, social computing applications, or companies like Capgemini which are using youtube for publishing their videos

It is a long, more than 1 hour but really it deserves time to watch it.

Kind regards