Octopus series of the development of the Inspiration Point collection, first put here, the back will be sorted

Source: Internet
Author: User
Tags sqlite query

Components referenced in the project

1.system.data.sqlite.dll Self-compiled sqlite-1.0.66.0-source 3.5 framework; F:\Code\ Open source project \sqlite\1.0.66.0_x86\ source \ Sqlite-1.0.66.0-source\bin "is now updated, not using this, this has a bug"
2.f:\code\ Open Source Component \litjson\0.9.0
3.nvelocity.dll from small Loach blog
*************************************************************************************************************** ***
Some ideas

1. It is advantageous to take apart a large object to avoid querying too many data "such as product objects" when acquiring data.
2. Define the manager of a SQL function, the SQL statement in the hypervisor, the Select section, the From section, the where section, the condition section, the grouping section, the sort section "This idea comes from PetShop"
3. Delegation function Realization Paging "This is even."
4. Good and canonical variable naming, can reduce the amount of code in the comments and increase the readability of the Code

Ideas for splitting multiple databases
Octopus.db Product Category Brand categories
OCTOPUSMEMBER.DB website member information, Shopping cart
Octopusorders.db Order Database
OCTOPUSCOMMON.DB Public advertising information such as general configuration information Static Code template management

*************************************************************************************************************** ***
Requirements Module

1. Look at my mind map
2. Refer to open source program Petshop,zencart,magento,balloonshop,opencart,nopcommerce, small loach ....
3.ShoppingNetwork
4. Online shopping website

Orchid Pavilion
http://www.footlocker.com/
http://www.sierratradingpost.com/site-map/
5. To test each function
*************************************************************************************************************** ***

Version 2.0
Major Updates
1. The business code inside the Vo object in the entity is extracted and placed inside the business BLL layer.

Need to update
1. Add a product associated property "already implemented"
2. Please do not call the product's picture information "not initialized"

3. Upgrade the first database, store customer and order information "using JSON storage because the amount of data is not very large"
4. Upgrade the database to split the current database to support more databases "already split"
5. With regard to the registration form, the form registration mechanism using Magento and the registration mechanism using the Orchid Pavilion gathering potential "did not adopt"


Reason Analysis:
Because most of our clients are customers of one-off transactions, the ability to open anonymous purchases is very necessary to "implement"
Like Orchid Pavilion such as the station, they have a fixed group of users, so each time the settlement of the order must be logged into the site to operate, but we are not the same


6. Call to update Classification: Specifies the invocation of several classifications; the invocation of the specified number of bars "has been implemented, not yet used"
7. Classify custom style attributes and present special identity styles for classification such as hot "post-expansion use"
8. New Product Details show the volume discount discount information "after implementation"


9. The foreground adds a visitor's history "back to implementation"


10. Simple Product Reviews
11. Preferential scheme of three program discount code discount scheme full amount of discount program volume
12. Product details of the display part of the increase in product related products to increase product collocation products
13. Add input attributes to product attributes
14. Increase the price attribute part of the product attribute that affects the price
15. The realization of the shopping cart part is implemented by the database method
16. Member Center
Built-in set of fixed templates to choose from
The login registration part is implemented by Ajax
Part of the membership center is implemented in a WebService way

17. Added the caching function of the language pack "already implemented"

Background Management Section

1. Bulk modification of product prices
2. Add new products in bulk

Developing a new Data Web service interface
Control things with a simple open API

Uniform adjustment services for freight and exchange rates

Requirements: Ensure that all website exchange rates are updated uniformly
Freight fulfillment: The part associated with each country region

Product size
A single such
With attribute prices, this

This type of multiple size

This kind of picture with color

*************************************************************************************************************** ***
1. On the issue of multi-lingual localization
Note Several places: The fixed string used in JS; title; the name of the tag; Alt;help link
It is recommended to define a global JSON object at the very beginning, which is useful for storing all the multilingual characters in JS, including the name of the cookie.

2. About all sorts in the current system: the larger the sort number, the higher the "Default relationship rule"

Sorting when sorting list is read
ORDER BY SortOrder Asc,categoryid desc
Sort the product list when read

3. Add Link information table connection management--mainly for the implementation of "Help, Privacy Policy connection"
4.
Increase product color attribute, increase product association algorithm "demand comes from uggouteltonline.us.com"
Update to increase the function of group purchase, buy more, there will be more concessions "demand from Zencart for the product set volume discount"
Update attribute picture--the storage ${siteurl}/red.gif of image address; Output to the foreground will be automatically replaced by "Wait for implementation"

Problems with 5.ProductInfo extension functions
Note: Extension functions can be extracted into public entities to Entityinfo
These functions have an address format such as creating a product URL, creating a URL address format for a categorized product, and extracting this into a common class

6. Whether the business logic should be doped in the Vo object
Should the Vo object be constructed in the business layer? Not the Vo Object doped complex business acquisition logic?
*************************************************************************************************************** ***

About classification
Whether the classification is a virtual classification
Sub-classification list under classification
Product List by category
Classified Marketing Information

1. Not all fields are required
2. The information should be categorized
3. Write a version of the invocation manual
*************************************************************************************************************** ***
The things that are about to be done
1. Migrating the Upgrade Database
2. Background Project function Basic needs simple mainly can refer to small loach design idea
3. Shopping Cart and Membership Center as well as some small features of things
4. One more thing is the problem of the previous paragraph


*************************************************************************************************************** ***
Basic Common sense questions
Save off 25% means save 25%
That means 75 percent.
Save 25%


Some of the most commonly used operations in the foreground are best done at the same time using scripting
These years make it easy to call in various places

*************************************************************************************************************** ***
Two ideas of shopping cart
The first: Do the submission on this page
The second type: how to collect scripts

Add a security value to the form submission for a Web site
<input type= "hidden" name= "SecurityToken" value= "94b6f35fd3e84e42c5742a83dab0f235" >

Through the separation of the page, to achieve different pages, JS loading, distinguish the requested page type can be "mainly refers to the head area"

As with one of the above questions, the function that executes after the document of different pages is loaded is not the same as the Ready function "is written in the page?" or in the external code? 】

Be careful not to add a setting style to the form tag at any time

NV can read: Be careful not to add "--" otherwise unrecognized

Extension to open a gzip compression mode "has been supported"

Httpcustom class Optimization:

1. Do not query too much data, such as previously thought of the shopping cart to add things, it is best not to do so
2. Post-optimization is the ability to join the object cache
3. User-Cached objects are written to the global object "also consider how to make the business layer use the Cache object"

Shopping cart must be implemented: can support the asynchronous call

Note this place: cache-control:private

Add the ID of the shopping cart from the cookie to the data context as the currency
You can use the cookie expiration time to continue to exist in the shopping cart mode setting after closing the browser

Compatible with JQ notation
var $a = jquery.noconflict ();
$a (document). Ready (function () {
$a (' #nav li '). Hover (
function () {
$a (this). addclass ("hover");
},
function () {
$a (this). Removeclass ("hover");
}
);
$a (' #nav ul '). each (function () {
$a (this). Parent (). addclass (' items ');
});

Add a user risk field judgment in the order module

Rules for checking passwords: After validation of rules, you can register

Restrict the registration of a user at a certain time in a certain IP location

Landing section
Detection request is not man-made operation at the same time to prevent the machine landing "attention to a mighty army"
First, the client's security detection and then the service side of the check "user email message validity check"

Attention to Optimization ioption

Note Optimization do not store oversized objects in the session

JS function Classification: Global page function, function of single page

Some links in the page with a bright chain, such as shopping car.ashx, etc. can be referenced in the Qblog method defined in the system.

To implement the customization of the link suffix in the URL

Idea: Abstract The class of the page to be processed
1. Separating out the abstraction and the interface
2. aspx-like have page base classes and control base classes implement their different lifecycles
3. Abstract public Code: Examples of templates are placed in public classes, public interfaces, and public ones after inheritance

Next, split the database
The separation of the database so to engage:

1 separates the reading and writing.
2. Separation of public configuration

Implementing support for SQLite's version database
And the implementation of the URL rewrite module


about the placement of promo codes
In the Shopping cart section? "Need to update the database for field issues"
Or put it in the settlement section?

Configuration of URL rewriting with full domain rewrite

There is another way of thinking: the implementation of sub-templates

Widgets

protected int ProductID = 0;


Get Product object properties based on product ID
The next few modules
Shopping Cart Module
Login Registration Module
Anonymous purchase feature
Member Center
Product Reviews


Submit data via Post
How to submit
/*
* Submit Submission Form
* Submitted via Ajax
*
* Invalid attribute value
* Attribute Price
* Style of property presentation
* Select drop-down box
* The span-style radio box gets the value from the hidden field
* text box for the user to enter the shirt number or some other information
*
* Quantity
*
* Product volume Discount "Automatic Preferential scheme design"
* Wholesale submission of multiple products to the shopping cart
* Raise different code by hiding the tag of the action in the field

ProductID = 12;
Switch (action)
{
Case "Add":
ProductID = 123;
Break
Case "Remove":
Break
Case "Update":
Break
Case "View":
Break
Default
Break
}*/

Using standard SQL notation

----------------------------
Order module:

When do I generate an order?

How can I prevent duplicate orders from being generated?

Handling of anonymous users

Handling of the receiving address

Order Information:
Order number Order Amount order receipt address information billing address information


Note When adding product images, be sure to place the main and detailed drawings of the product in the Imglist field of the product.


#region Notes
Handling categorical URL address formats
http://localhost:40966/women-s-boots/
Http://www.hermesglobalshop.com/hermes-birkin-c-1.html

Http://localhost:40966/shop-women/c11.html
http://www.hermesglobalshop.com/hermes-birkin-c-1.html?page=2&sort=20a
Http://localhost:40966/florent-rio-pink-314011.html
Http://localhost:45956/page/3.html
Http://localhost:45956/category/default/page/3.html
Http://www.hermesglobalshop.com/hermes-birkin-bag-30-alezanchestnut-brown-ostrich-skin-gold-har-p-98.html

Classification
Http://www.hermesglobalshop.com/hermes-birkin-c-1.html
Http://www.hermesglobalshop.com/hermes-birkin-c-1/page-1.html
Http://localhost:45956/category/default/page/3.html

Http://official.usahandbagsonline.com/Satchels-c-2/p3.html
Http://official.usahandbagsonline.com/Satchels-c-2.html

Products
Address format for processing product URLs
Http://localhost:40966/florent-rio-pink-314011.html
Http://www.hermesglobalshop.com/hermes-birkin-bag-30-alezanchestnut-brown-ostrich-skin-gold-har-p-98.html
#endregion

To streamline the process of making templates
Start separating from this place in the shopping cart.

CSS to be split open

1. Shopping Cart Module
2. Login Registration Module
3. Payment Module
4. Member Center Module
In order to make the above several places to achieve separate independence so that in the production of templates, you can do a few pages

You can only use the page details page

The Help Center is also individually modular

Requirements target
1. Compatible with each browser
2. Normalized naming
3. Do not add too many CSS style code to the page

Loading instructions
Load the style before introducing the script

Improving the introduction algorithm of some static pictures
var thempath= "";
Replace these pictures in batches

Prevent problems caused by changing picture folders


<script type= "Text/javascript" >
$ (document). Ready (function () {
var Themepath = "themes/fitflops/pc/";
var src = $ ("Img[data-theme= ' img ')"). attr ("src");
$ ("Img[data-theme= ' img ')"). attr ("src", Themepath + src);
});
</script>

Binding the latest hottest products

Binding Static Code

Binding AD Images

should be loaded as a global object

Append a test: How many databases do I need to test a request?
Append a custom file cache feature

Why do I have to update the database when I change this place? The reason is that there is an exception to deserialization

Note Trace GetCookie 1193 lines public static string GetCookie (String strName)

Key to URL rewriting

1. See what requests are made
2. Identify requests that need to be rewritten
3. Which function to use to rewrite

4. Find the URL path we need to rewrite in a number of requests

Two pips
Custom HTML should support multiple templates to achieve
Background judgment when landing, through the IsLogin implementation "through the front of the script implementation"


Add a log function in the background:
Individual statistics:
Like what:
Whether to turn on URL rewrite logging
Whether to turn on log analysis logging for SQL
Whether to turn on log records for Web program failure

Add a backend "backdoor"--restart the site to prevent deadlock use
Do not use the self-increment field again "through the Code control"


Updating paging algorithm with double top paging algorithm through log analysis


Add a Register JS script used to do the foreground of the multilingual static output similar to the implementation of the LAN pavilion by ASHX Way to respond to the foreground
Extend the shopping cart to a place with a magento style

Extended Diag Dialog adds a variety of skin styles to study its source code
It's also useful to look at other pop-up layers or something.

There are also extensions such as tab functions or drop-down boxes

Background login to deal with the problem of landing through the way of script

Forms authentication

Does not use the session support Web garden will affect the database?

How much of a database split is appropriate?

How to solve his concurrency problem?

A detailed consideration of the question of price

Increase the unified management of the cache

Background settings Currency The foreground does not take effect immediately and is not a bug, the cache setting for the cookie should be in front of the currency

The memory goes up very badly: join the cache to track all queries using the log tracking function


Head part split
Public meta Section
Common Styles Section
Public Script Section

<div class= "Header" >
<!--note writing specifications--
#parse ("pc/template/_header_1.html")
</div>
<div class= "Nav_container" >
#parse ("pc/template/_nav_1.html")
</div>

What does site initialization include?
Interaction between the foreground and the overall background
Remaining parts
Script section
Member Center Section
Preferential policies
File cache
Favorites Section


Normalization of naming
Log section

#region Test
Test whether the dictionary type and Hashtable are recognized
dictionary<string, string> option = new dictionary<string, string> ();
Hashtable option = new Hashtable ();

Option. ADD ("Color", "Black");
Option. ADD ("Size", "US 10/uk 14/eu 40");

Vcontent.put ("P", option);
#endregion


Widgetcart
#region 1.0 Reload The suspension is not very efficient.
Object obj = Vcontent.get (tagfields.reload);
if (obj = = null)
//{
Vcontent.put (Tagfields.reload, String. Empty);
//}
#endregion

#region 1.0

Vcontent.put ("form", forms);
Questions about parameter checking to prevent malicious requests from appearing
is divided into the need for parameter checking and public parameter checking to write a page helper value of something
Write the default rules for each parameter in the

#endregion

--Description
--Simple description of the data type
--supports five types of data
--Integer text type floating-point time type constraint size
--Sample data
--Name text NOT NULL collate nocase
--Phone text NOT null default ' unknown '
--Time Date:current_time current_date Current_timestamp
--Some Notes
--1. Do not use the so-called self-increment field in the database
--2. For the integer type, the corresponding Int64 in. NET is recommended to use the Int type definition at the time of definition
The same is true for 3.decimal types, if you use the real type, the type of double that corresponds to. NET is
-4. For character types "This needs to be tested"


Unify several types
1.decimal Type decimal digits
2. Time Type
3. Sort fields
4. Switch value 0:false 1:true
5. Default value

Components for exporting Excel Remember to copy the configuration file to the bin directory after each modification
SQLite remembers to convert time ("s") when inserting time.

If SQLite is a null type when defining a time type, remember to set it to a default value otherwise the Read will prompt
"SQLite Query Exception: The string is not recognized as a valid DateTime error"

Octopus series of the development of the Inspiration Point collection, first put here, the back will be sorted

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.