A scenario based web design tutorial using MVC

Status
Not open for further replies.
I find the web development tutorials less than satisfactory so I'm thinking about constructing a tutorial that is more representative to a real life situation where we have a fictitious company that is selling and marketing a limited set of products through their website, and we are to cover most of the aspects involved with such a scenario.

I assume that we use Python with all its libraries and the Django framework and it's using Postgresql for database interactions wherever and whenever that is necessary. All of these functionalities are set up and production ready, all we have to do is to dive into the coding and web design.

The tutorial that I have concocted:
-----------------------------------------

1a. I want to build a website that sells products A, B and C. Products A and B are standardized whereas product C is customizable. When ordering C, the user can chose between 3 different sizes, 5 different colors and an optional case where all changes but colors affect the price of C.

1b. All products have a certain set of attributes that is shown under four different types of fields/subfields; "overview", "technical details", "preview" and "reviews". The "technical details" lists the attributes of a given product in detail, a list of user submitted comments are shown under "reviews", and an overview with a brief description featuring images and perhaps a few video clips are shown under "overview". There is also a "preview" field showing condensed information about the product including a smaller thumb pic as presented in search results or other listing types. All attributes in these products are to be maintained in some kind of a database that an administrator can use to edit attributes or to add or remove certain products. It should be noted that some of those attributes should not be visible to customers. Attributes such as supplier, their prices, stock of suppliers.

2. The website has a search function that searches the query through all attributes of the products.

3. There is a database of users featuring shipping address and contact details, unique username and password for login. A user can add any of the products to cart and checkout, upon checkout, three different payment options are to be chosen and three different shipping methods.

4. When an order is confirmed, an email is sent to the user with confirmation and a unique order number. Orders and their quantities are maintained in a certain database.

5. A comment system that allows users to write comments about one of products A, B, C. This comment system is later to be replaced with a rating system where each user can rate 1. customer service, 2. satisfaction with shipping and 3. quality of product. All comments and in the future, their ratings should be maintained in a database of some kind.

6. Users should be able to upload video clips to the website showing how they experience the product from say a smartphone camera and let the website stream those clips publicly as Youtube or Vimeo. The submission comes with a brief description and an indication of what product the given user is experiencing. In the beginning, a simple transcoding library should suffice but later, some editing and effect/post-processing features are to be expected.

7. An online configurable app plotting the prices of a stock or something for a given period of time, or something else.

8. Incorporation of the ability to share certain elements of the website on social media such as Facebook, LinkedIn, Tumbler, Stumbleupon etc.

9. Build a simple administration console for different roles within the company, say webadmin, purchasing, dispatching/customer service and economy departments.
-----------------------------------------

Any ideas on how to start? I'll submit code of my progress if anyone is interested.
 
I've heard about Elixir and some people say that is a good development platform with a great deal of modularity. Other people seem to like Swift a lot that also has a good modularity that makes it easier to maintain code on larger projects. But Swift is for MacOS and the code that I write will end up on a Linux based server. I mean, why on earth would I want a MacOS computer to host my web applications? While functional programming is exciting and all I'd prefer to stick to something that has a wider acceptance in the industry and therefore decided to go with Python.

But I guess the discussion was about the tutorial and the design of it. While it is convenient, I don't believe that watching a narrated tutorial that does a lot of hand-holding is a very good way of learning things. I think it is more efficient with a tutorial that puts you in a situation where you have to solve a problem yourself and find relevant information on your own. Narrated tutorials might be a good complement though and help give a good overview of things...

The problem I have at hand is fairly complex and in a situation like this I have to break it down at first.

The first issue I have to deal with is how to make django systematically run queries with a database server and put them in some kind of data structures that can be parsed to a html renderer. The 'pandas' package has some 'DataFrame' functionality that might be useful. I'm trying to figure out how the data can be parsed back and forward between the python server and the database server. If there are other and more efficient ways, I'm open for suggestions.
 

drogin

Ars Tribunus Angusticlavius
8,283
Subscriptor++
[url=http:/civis/viewtopic.php?p=31379393#p31379393:epqwbue1 said:
g00ey[/url]":epqwbue1]I've heard about Elixir and some people say that is a good development platform with a great deal of modularity. Other people seem to like Swift a lot that also has a good modularity that makes it easier to maintain code on larger projects. But Swift is for MacOS and the code that I write will end up on a Linux based server. I mean, why on earth would I want a MacOS computer to host my web applications? While functional programming is exciting and all I'd prefer to stick to something that has a wider acceptance in the industry and therefore decided to go with Python.

But I guess the discussion was about the tutorial and the design of it. While it is convenient, I don't believe that watching a narrated tutorial that does a lot of hand-holding is a very good way of learning things. I think it is more efficient with a tutorial that puts you in a situation where you have to solve a problem yourself and find relevant information on your own. Narrated tutorials might be a good complement though and help give a good overview of things...

The problem I have at hand is fairly complex and in a situation like this I have to break it down at first.

The first issue I have to deal with is how to make django systematically run queries with a database server and put them in some kind of data structures that can be parsed to a html renderer. The 'pandas' package has some 'DataFrame' functionality that might be useful. I'm trying to figure out how the data can be parsed back and forward between the python server and the database server. If there are other and more efficient ways, I'm open for suggestions.

I think you're confused about what a tutorial is. There's supposed to be hand holding. What it now sounds like is that you want a a "problem" that comes with a "solutions manual" for those that get stuck. Totally different.
 
Then I would assume that a lot of people out there are confused about it. The "handholding" part is in the solutions manual. Most "tutorials" I have found are designed as you describe.

I read once a book about MySQL and I absolutely loved it. The book was describing a fairly real life scenario where as you went along chapter after chapter you implemented different aspects of this scenario and learned more complex things. The exercises in that book were broken and did not work. So I had to "troubleshoot" most of them and find the solutions on my own. Solutions I found, and I learned a lot from the troubleshooting procedure as I really had to delve into the inner workings of the database programming. I followed that book along with another book that treated relational databases from a theoretical perspective, defining mathematical concepts behind it such as projections, carthesian products etc. I think those two books were a great combo for my SQL learning. Then I moved on to Postgresql as it can swallow more complex queries with nested subqueries better than MySQL and appears to be more stable overall.
 

krimhorn

Ars Legatus Legionis
39,865
[url=http:/civis/viewtopic.php?p=31385147#p31385147:31kxf8zz said:
g00ey[/url]":31kxf8zz]Then I would assume that a lot of people out there are confused about it. The "handholding" part is in the solutions manual. Most "tutorials" I have found are designed as you describe.
A tutorial is guided instruction. Depending on the level of the target audience you'll provide more or less guidance. Advanced tutorials (that presume you already know all of the basics of the frameworks, languages and concepts being used) will often act much like you're describing and only go in depth on the advanced concepts. However, that doesn't sound like the scenario you described. You've described a concept that would most commonly be found in a beginner's tutorial and you simply cannot assume that the person following that even knows where to begin in asking questions. It's your job (as the tutorial writer) to give them that context so that they can go out and solve other more complex problems.

I read once a book about MySQL and I absolutely loved it. The book was describing a fairly real life scenario where as you went along chapter after chapter you implemented different aspects of this scenario and learned more complex things. The exercises in that book were broken and did not work. So I had to "troubleshoot" most of them and find the solutions on my own.
That's the approach to teaching that a textbook would take. It's a totally valid way to teaching (in fact it's the default ;)) but it's not a tutorial. If you want to go that route then you need to break your book up into very discrete concepts, that build on top of each other, and still walk them through, step-by-step, how to implement those concepts. In order to do so you'll actually be guiding them through one project while presenting a second project for them to practice the concepts presented for themselves.
 
I find that "textbook" definition too sweeping. I think I was pretty lucky to have found that book in MySQL, I didn't realize how lucky I was until I struggled to find a similar book for Postgresql. Luckily, the transition from MySQL to Postgresql didn't turn out to be too big of a hurdle anyway.

A textbook to me would be like that theoretical book that I read or maybe more like the book "The C++ language" by Bjarne Stroustrup. It's a good book for reference and if there is something about a particular command you are wondering about, Bjarne's book gives a good explanation. But as a primary resource for learning C++ I'd say it's not so good, simply because it lacks a proper scenario based context where you are about to solve a particular problem. I really don't like most programming textbooks, I find them counterproductive somehow.

What you mean with "beginner" is also not that clear. You may be a beginner when it comes to developing certain types of websites or in this case, building them using Python. That while you may have a basic overall familiarity with Python, html and know the basics of setting up a simple home page. That familiarity might even have been established with existing beginner's tutorials.
 
Status
Not open for further replies.