2010년 11월 14일 일요일

[Beauty Shop Management Programm] 2.Database Modeling

I will use SQL Sever 2005 Express as a database because it goes well with ASP.NET. If you want, you can change database to other products such as MySQL, PostgreSQL, and so on esaily because ASP.NET usually uses ORM framework(LINQ to SQL, Entity framework, NHibernate) to handle database. It make it possible persistent layer dependant to your database, so it doesn't matter which database you are using as your DBMS.
If you don't have SQL Server 2005 or 2008 Express, please go to Micorsoft web site and download one of them. I remember that after installation SQL Sever 2005 Express, it causes a problem because of Windows account. Then, just googling.

The datase will include customer, designer, item category, item, sale, customer-sale, designer-sale information.

[Beauty Shop Management Programm] 1.Create Usecase Diagram

First step of this project is to create Use Case Diagram which show functions you need in this application. My result of Use Case is following:

Actors are customers, designers, and admin. We can extract some function from this business.
[Customer]
A customer makes an appointment with a designer.
A customer orders services.
A customer purchases beauty items.
A customer gets a refund items he bought after payment.
A customer pays for fare.
A customer signs up.
A customer uses having points.
[System]
System prints invoices.
System accumulates points.
System changes points.
[Designer]
A designer view bookings.
A designer offers services.
[Admin]
A administrator logins to the system.
A administrator input member detail.
A administrator input items.
A administrator views reports.
A administrator send mails.

I create the Use Case Diagram for a beauty shop and defined functions. This would not be the best, but it will be enought to proceed Beauty Shop project.

2010년 9월 10일 금요일

Mvc Music Store(2) - Create Project

File / New Project

Run Visual Studio. (In my case, I have Visual Studio 2008). Please select File>New>Project on then mainmenu.

Then we will select "ASP.NET MVC2 Empty Web Application" template. Please give the 
Name: MvcMusicStore
Location: C:\Project
Solution Name: MvcMusicStore


Press Add button and then after a while a new proejct will be created. Please have a look at the folders which are included in our application in the Solution Explorer on the right side.

ASP.NET MVC makes use of some basic conventions for folder names. I think that this is important knowledge to understand ASP.NET MVC.

 /Controllers
   Controllers are a kind of gateway because every request from Web Browser pass through Controllers. They respond to input from the browser, decide what to do with it, and return to the user. I can feel that this controllers act like a post office. Post office deliver their letters according to their address through post men. Therefore, our starting point in this project will be from Controllers.
/Views
  Views take charge of displaying content on the Web Browser. So Views include HTML and CSS codes. Views hold our UI templates.
/Content
  This folder holds some resources like images, CSS files, and any other static content.
/Scripts
  What is the scripts in Web Applications? It means JavaScript, so this folder contains JavaScript files.
/App_Data
  This folder holds data files which can be read and updated by the application.

Let's open Window Explorer and have a look at the real folder structure.

"MvcMusicStore" folder on the left has created under the Solution folder "MvcMusicStore" because we gave the same names with solution name and project name.


One interesting thing is ASP.NET MVC is using jQuery as a basic JavaScript framework. This indicates that ASP.NET MVC will offers all powerful functions jQuery does.

These folders are included even in an Empty ASP.NET MVC application because the framework makes some assumptions based on folder in naming conventions. For instance, controllers look for views in the Views folder by default, so sticking with the basic conventions not only makes it easier for other developers to understand your project, it simplifies your code.

2010년 9월 9일 목요일

Mvc Music Store(1) - Overview

Mvc Music Store is an good example which is provided by Microsoft ASP.NET web site. It guides us the concept of Model-View-Controler(MVC) in ASP.NET and .NET framework in Web development. I think that it is a good help to those who start with ASP.NET like me. I would like to share extensible information about this sample project. You can see the orginal lecture of this project on the site:



Overview
 
 Mvc Music store is a simple application based on ASP.NET MVC 2. There are three main parts in the application: shopping, checkout, and aministration. The feature of main page is like following.


In this application, the system has the requirements like:
 - Browsing albums by Genre.
 - Viewing the detail of an album.
 - Adding it to their shopping cart.
 - Reviewing cart, removing items in the cart. 
 - Checkout.
 - To login or register for a user account for Checkout.
 - Input order detail.(shipping information - name, address, tel no, etc...)
 - Administrator mode.(list, create, edit, and delete)

If you don't have Visual Studio or SQL Server, please download them first. The Express tools can be installed using the Web Platform installer here: http://www.microsoft.com/web/platform/tools.aspx
 


2010년 9월 7일 화요일

Troubleshooting - User instance error in SQL Server 2005 Express

Generating user interfaces in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instance.

1. Download SQL Server Management Studio Express. You can download this software for free from Microsoft website.
2. Press Ctrl+N or Click File->New->Query with Current Connection and input query and execute:

    exec sp_configure

2010년 9월 4일 토요일

Configuration - Download SQL Server 2005 Express Edition

In order to install database, you can download SQL Server 2005 Edition version from the link below: 

http://www.microsoft.com/sqlserver/2005/en/us/express.aspx

Visit above site and click;

SQL Server 2005 Express Edition with Advanced Services SP3

Then, you will be able to download SQLEXPR_ADV_KOR.EXE.

After completion of installation, you will see some serivices through Windows Control Panel.

2010년 8월 12일 목요일

Flex - LiveCycle Data Service installation and configuration(Windows)

I am going to install LiveCycle Data Service(LCDS) to test RemoteObject in Flex. The LCDS I install is lcds3.1 Windows version.  

1.Install LCDS ES as following:
Step1. Click Next.

 Step2. Click agreement and Next.

Step3. You can skip inputing serial number. Click Next.

Step4.Choose select installation folder and click Next.
  

 Step5. If you choose 'tomcat' option, Tomcat6.x will be installed under the lcds install directory.

 Step6.Click Install.

 Step7. Installation in progress. Wait upto next screen.

 Step8.Read message and click Done.
 
 Step9. Installation completion


 You can browese the structure of lcds directory like below: You can see the tocamt folder installed.


2. Setup LCDS
To run tomcat server, set Windows environment variable 'CATALINA_HOME' .

LCDS_HOME:  the directory lcds installed
CATALINA_HOME: %LCDS_HOME%tomcat. the directory tomcat installed (in my case, c:\lcds\tomcat)

3. Run tomcat running %CATALINA_HOME%\bin\startup.bat.

After starting Tomcat, go to http://localhost:8400/lcds  and check if error occursor not.

if you saw the screen like ahead, it says that LCDS installed successfully.

4. If you want to change the port for connection, open %CATALINA_HOME%\conf\server.xml and edit below and restart server.
<Connector port="8400" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 redirectPort="9400"/>


5. You can see the demos connection to http://localhost:8400/lcds-samples .

 

5. You can see the successful screen.

2010년 8월 11일 수요일

JRun - Troubleshooting "error Could not pre-load servlet: MessageBrokerServlet"

Evironment
- JRun4 + Update6
- LCDS2


I have installed JRun4 already but couldn't run the server. So I search on the Internet about the error and I found the solution. I updated JRun server using Update6. However this time another error ocurred, so I coudn't the server again. Again, thanks to the Internet I got some hint to solve my situation. The error I have met like the picture below:


JRun uses apche API to handle log and this message was that JRun found some same libraries under the JRun directory relating to processing loggin in form of .jar file. The name of library is commons.logging.jar to handle logging.
So I searched the files like below:


I got rid of all highlited files except one. Only valid one is located under default.
Now, it works.

2010년 8월 10일 화요일

JRun - Troubleshooting when running JRun server

 Feature1. JRun launcher


Feature2. JRun error when starting


I downloaded and installed JRun4.0 developer version. After installation, when I ran the server I met the error like above. So I searched Google and got some answers. Here is solution when you meet the same error like me.


1. Open JRun_install_dir/bin/jvm.config file and edit the line starts with "java.args" like below:

java.args=-Xms32m -Xmx128m -Djmx.invoke.getters=true


2. Save the file and restart JRun server through the launcher.
The fixed screen here:
 feature3. fixed screen


See the link if you want to know about how to configure JVM(Java Virtual Machine) configuration.

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf5fb32-7ff5.html

 
In other case, you can't run the server when you work with JRun4 with Java1.5. JRun4 doesn't support Java1.5 and over and so you have to update JRun4 using updater6 to use Java1.5.