My webshop project

oynaz

Platinum Member
May 14, 2003
2,448
2
81
Hi guys

A friend have convinced me to build a webshop. We have a deal with a company who have agreed to give us direct access to their order- and payment systems. In essence, we are providing a sales interface, and they provide the back end.

The only problem is: I am not a very good programmer. I have some HTML/CSS experience, some Java experience, and some Microsoft SQL experience.

I really enjoy a challenge, and I might want to become a programmer, so this is a good way to gain some skill. Both the company and my friend know that this is a learning experience for me, so no worries there.

Hence this thread, where I will ask for help, and post versions of my site for all of you to point and laugh at.

Hope this is the right forum, if not, please point me in the right direction
 

oynaz

Platinum Member
May 14, 2003
2,448
2
81
1st question:

Right now, I use HTML and CSS, and have 3 separete HTML documents (main, FAQ, About Us). I would like a version number in the bottom, but rather than entering it manually on each page, I would like to enter it as variable, so I only have to change it one place. How do I do this? I can change the style of the version number using CSS, but can I also change the content?
 

beginner99

Diamond Member
Jun 2, 2009
5,231
1,605
136
1st question:

Right now, I use HTML and CSS, and have 3 separete HTML documents (main, FAQ, About Us). I would like a version number in the bottom, but rather than entering it manually on each page, I would like to enter it as variable, so I only have to change it one place. How do I do this? I can change the style of the version number using CSS, but can I also change the content?

You will need a server-side programming language that generates the HTML markup. You can use java for that (JSP, Servlets), PHP, ASP.NET or python.

Anyway IMHO a webshop is rather important and i would not do it myself especially ift it were my first real project, alone. there are tons of open-source webshops. i suggest you use one of those:
http://shoptags.de/30-kostenfreie-open-source-shopsysteme/
 

oynaz

Platinum Member
May 14, 2003
2,448
2
81
Thanks for that link. I will look into it.

I don't know which language the server uses uses yet, probably ASP.net. Rather important information, I know. I am only brainstorming and mucking about at the moment.

BTW, I have made 3 simple webpages before, but none of them was interactive, apart from a very simple guestbook.
 

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
I have been a php dev for a while now. But I've been doing J2ee this year and I'll tell you I'm addicted to it.

You should look into using Java especially if you have a brief history with it. If you use Netbeans with the Maven you can setup a web environment in minutes. Use Spring 3's webmvc library, a Mysql server with java mysql library and you can setup what you need in a weekend.

Make a BaseController for your all your other controllers to extend. It will itself extend Spring's mvc library. If you want it all web2.0 then you can create a header private method in that BaseController that will send json output.

Then you can use annotations in your child controller methods to set things to get or post calls via JQuery inside of plain html pages (or jsp if you want session data). Use Mybatis to wrap your database object's SQL counterpart around the Java object.

You can make a BaseModel that will have a few protected methods. You'll wanna use FlexJson into Json that you want to get via JQuery.

Your POM.xml should look something like this.

Code:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.your.store.front</groupId>
    <artifactId>StoreFront</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>Your Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <properties>
        <org.springframework.version>3.0.6.RELEASE</org.springframework.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.18</version>
		</dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.0.6</version>
        </dependency>
        <dependency> 
            <groupId>net.sf.flexjson</groupId> 
            <artifactId>flexjson</artifactId> 
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.0.1</version>
            <classifier/>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>StoreFront</finalName>
    </build>
</project>

I would suggest making a basic site that uses JSP and sessions to keep users logged in. Then you can make a common JavaScript framework that wraps some jquery stuff. You can use the Class Jquery plugin from JavascriptMVC. This way you have one main Javascript Psuedo-Class that each page can extend with its on Child Psuedo-Class. Each child would be custom taylored to the HTML elements you need to interact with. Hint: All your interaction logic should be in the Parent class... the child will essentially call them, passing in the elements you want to bind to.

I'd also suggest using Underscore.js to give you some good javascript functions to help make coding Javascript not as alien to you as it might be.

You can build a small, yet robust site with everything in this post. Read up on Apache Maven. Get a book on JSP/Servlets. Don't fret over spring 3... there are some very simple tutorials online for just the mvc. All your dependencies will be brought in that you need.
 

velvetpants

Member
Aug 29, 2009
72
0
0
Even experienced developers shiver by the thought of writing ecommerce applications.
You're handling people's money and personal information (credit card numbers etc.)

It only takes 1 mistake in the right place to fuck you and a bunch of other people.

If it's just for learning, then cool. But please don't use this in a production environment or spread it around until you're absolutely certain your program is secure, functional and most importantly, all calculations are 101% correct.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |