[limb-svn] r6123 - in 3.x/examples/shop: . db init settings src/controller/cart

svn at limb-project.com svn at limb-project.com
Mon Jul 9 18:52:51 MSD 2007


Author: wiliam
Date: 2007-07-09 18:52:50 +0400 (Mon, 09 Jul 2007)
New Revision: 6123
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6123

Added:
   3.x/examples/shop/db/
   3.x/examples/shop/db/sqlite.db
Removed:
   3.x/examples/shop/init/db_sql.sqlite
Modified:
   3.x/examples/shop/settings/db.conf.php
   3.x/examples/shop/src/controller/cart/CartCheckoutCommand.class.php
Log:
-- renaming db_sql.sqlite to db.sqlite and moving previous db.sqlite into db/sqlite.db

Added: 3.x/examples/shop/db/sqlite.db
===================================================================
(Binary files differ)


Property changes on: 3.x/examples/shop/db/sqlite.db
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: 3.x/examples/shop/init/db_sql.sqlite
===================================================================
--- 3.x/examples/shop/init/db_sql.sqlite	2007-07-09 13:53:47 UTC (rev 6122)
+++ 3.x/examples/shop/init/db_sql.sqlite	2007-07-09 14:52:50 UTC (rev 6123)
@@ -1,44 +0,0 @@
-CREATE TABLE 'order' (
-  id INTEGER PRIMARY KEY,
-  user_id bigint(20) NOT NULL default '0',
-  date bigint(20) NOT NULL default '0',
-  summ float default NULL,
-  status int(11) default NULL,
-  address text
-) ;
-CREATE TABLE order_line (
-  id INTEGER PRIMARY KEY,
-  order_id bigint(20) NOT NULL default '0',
-  product_id bigint(20) default NULL,
-  quantity int(11) default NULL,
-  price int(11) default NULL
-) ;
-CREATE TABLE product (
-  id INTEGER PRIMARY KEY,
-  title varchar(255) default NULL,
-  description text,
-  is_available tinyint(1) default NULL,
-  price float default NULL,
-  image_name varchar(255) default NULL
-) ;
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (5,'Code Generation in Action','Developers using code generation are producing higher quality code faster than their hand-coding counterparts. And, they enjoy other advantages like maintainability, consistency and abstraction. Using the new CG methods they can make a change in one place, avoiding multiple synchronized changes you must make by hand.\r\n\r\nCode Generation in Action shows you the techniques of building and using programs to write other programs. It shows how to avoid repetition and error to produce consistent, high quality code, and how to maintain it more easily. It demonstrates code generators for user interfaces, database access, remote procedure access, and much more.\r\n\r\nCode Generation in Action is an A-to-Z guide covering building, buying, deploying and using code generators. If you are a software engineer-whether beginner or advanced-eager to become the "ideas perso
 n," the mover-and-shaker on your development team, you should learn CG techniques. This book will help you master them. ',1,45,'code_generation_in_action.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (7,'Programming Ruby: The Pragmatic Programmers'' Guide, Second Edition','Ruby is an increasingly popular, fully object-oriented dynamic programming language, hailed by many practitioners as the finest and most useful language available today. When Ruby first burst onto the scene in the Western world, the Pragmatic Programmers were there with the definitive reference manual, Programming Ruby: The Pragmatic Programmer''s Guide.\r\n\r\nf you enjoyed the First Edition, you''ll appreciate the new and expanded content, including: enhanced coverage of installation, packaging, documenting Ruby source code, threading and synchronization, and enhancing Ruby''s capabilities using C-language extensions. Programming for the world-wide web is easy in Ruby, with new chapters on XML/RPC, SOAP, distributed Ruby, templating systems and other web services. There''s even a new chapter on unit testing. This is 
 the definitive reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including more than 250 significant changes since the First Edition). Coverage of other features has grown tremendously, including details on how to harness the sophisticated capabilities of irb, so you can dynamically examine and experiment with your running code.',0,44.95,'programming_ruby.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (8,'Java Persistence with Hibernate','Persistence-the ability of data to outlive an instance of a program-is central to modern applications. Hibernate, the most popular Java persistence tool, provides automatic and transparent object/relational mapping making it a snap to work with SQL databases in Java applications. Hibernate applications are cheaper, more portable, and more resilient to change. Because it conforms to the new EJB 3.0 and Java Persistence 1.0 standard, Hibernate allows the developer to seamlessly create efficient, scalable Java EE applications.\r\n\r\nJava Persistence with Hibernate explores Hibernate by developing an application that ties together hundreds of individual examples. You''ll immediately dig into the rich programming model of Hibernate 3.2 and Java Persistence, working through queries, fetching strategies, caching, transactions, conversations, and more. You''ll 
 also appreciate the well-illustrated discussion of best practices in database design, object/relational mapping, and optimization techniques.\r\n\r\nIn this revised edition of the bestselling Hibernate in Action, authors Christian Bauer and Gavin King-the founder of the Hibernate project-cover Hibernate 3.2 in detail along with the EJB 3.0 and Java Persistence standard. ',1,60,'hibernate.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (9,'The Pragmatic Programmer: From Journeyman to Master','Programmers are craftspeople trained to use a certain set of tools (editors, object managers, version trackers) to generate a certain kind of product (programs) that will operate in some environment (operating systems on hardware assemblies). Like any other craft, computer programming has spawned a body of wisdom, most of which isn''t taught at universities or in certification classes. Most programmers arrive at the so-called tricks of the trade over time, through independent experimentation. In The Pragmatic Programmer, Andrew Hunt and David Thomas codify many of the truths they''ve discovered during their respective careers as designers of software and writers of code.\r\n\r\n Some of the authors'' nuggets of pragmatism are concrete, and the path to their implementation is clear. They advise readers to learn one text editor, for exa
 mple, and use it for everything. They also recommend the use of version-tracking software for even the smallest projects, and promote the merits of learning regular expression syntax and a text-manipulation language. Other (perhaps more valuable) advice is more light-hearted. In the debugging section, it is noted that, "if you see hoof prints think horses, not zebras." That is, suspect everything, but start looking for problems in the most obvious places. There are recommendations for making estimates of time and expense, and for integrating testing into the development process. You''ll want a copy of The Pragmatic Programmer for two reasons: it displays your own accumulated wisdom more cleanly than you ever bothered to state it, and it introduces you to methods of work that you may not yet have considered. Working programmers will enjoy this book. --David Wall\r\n\r\n',1,45.99,'pragmatic_programmer.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (10,'Ajax in Action','Val''s Blog "A tremendously useful field guide specifically written for developers down in the trenches...waiting for the killer solution..."\r\n\r\nWeb users are getting tired of the traditional web experience. They get frustrated losing their scroll position; they get annoyed waiting for refresh; they struggle to reorient themselves on every new page. And the list goes on. With asynchronous JavaScript and XML, known as "Ajax," you can give them a better experience. Once users have experienced an Ajax interface, they hate to go back. Ajax is new way of thinking that can result in a flowing and intuitive interaction with the user.\r\n\r\nAjax in Action helps you implement that thinking--it explains how to distribute the application between the client and the server (hint: use a "nested MVC" design) while retaining the integrity of the system. You will learn how to ensur
 e your app is flexible and maintainable, and how good, structured design can help avoid problems like browser incompatibilities. Along the way it helps you unlearn many old coding habits. Above all, it opens your mind to the many advantages gained by placing much of the processing in the browser. If you are a web developer who has prior experience with web technologies, this book is for you. ',0,44.95,'ajax_in_action.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (11,'Programming PHP','PHP is far more than a cult language or open-source icon. It''s a remarkably capable language that''s well integrated with lots of technologies--notably mSQL and MySQL database servers--and quite easy to learn. Programming PHP helps you up the PHP learning curve, very nearly guaranteeing that you''ll find in its pages an example that illustrates every fundamental aspect of the language and its most important extension modules. Plus, there''s some cool advanced stuff, like recipes for manipulating images, working with Extensible Markup Language (XML) content, and generating Adobe Acrobat (PDF) files. Rasmus Lerdorf invented PHP and quarterbacks its ongoing evolution, so there''s little question of the content''s authority.\r\n\r\nThe authors use a Talmudic style to explore PHP''s capabilities and explain them to their readers, meaning that they like to present code and 
 commentary in close formation, with each enhancing the other. Typically, they''ll present a capability generically and show the relevant code. Then they''ll dig into variations on the theme, calling attention to required code alterations as they go. This is a book about PHP itself, so practically no attention is paid to PHP Builder or other development tools. Regardless, this book will help you solve programming challenges with PHP, and enable you to write efficient, attractive code. --David Wall',1,40,'programming_php.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (12,'MySQL Cookbook','Good programming--which is to say, programming that yields both efficient code and a profitable life for the programmer--depends on not reinventing the wheel. If someone else has solved the problem you''re facing (and someone almost always has), you''d be foolish to waste your energy figuring out your own solution. MySQL Cookbook presents solutions to scores of problems related to the MySQL database server. Readers stand a good chance of finding a ready-made solution to problems such as querying databases, validating and formatting data, importing and exporting values, and using advanced features like session tracking and transactions. Paul DuBois has done a great job assembling efficient solutions to common database programming problems, and teaches his readers a lot about MySQL and its attendant APIs in the process.\r\n\r\nDuBois organizes his cookbook''s recipes into
  sections on the problem, the solution stated simply, and the solution implemented in code and discussed. The implementation and discussion sections are the most valuable, as they contain the command sequences, code listings, and design explanations that can be transferred to outside projects. The main gripe readers will have about MySQL Cookbook is that the author, in his effort to cover the range of MySQL-friendly programming languages, uses different languages in his solutions to various problems. You''ll see a Perl solution to one programming challenge (Perl, in fact, is the most frequently used language, followed by PHP), a Python fix for the next, and a Java sample after that. Readers have to hope that they find a solution in the language they''re working with, or that they''re able to transliterate the one DuBois has provided. It''s usually not a big problem. --David Wall ',1,49.99,'mysql_cookbook.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (13,'Refactoring: Improving the Design of Existing Code','Your class library works, but could it be better? Refactoring: Improving the Design of Existing Code shows how refactoring can make object-oriented code simpler and easier to maintain. Today refactoring requires considerable design know-how, but once tools become available, all programmers should be able to improve their code using refactoring techniques.\r\n\r\nBesides an introduction to refactoring, this handbook provides a catalog of dozens of tips for improving code. The best thing about Refactoring is its remarkably clear presentation, along with excellent nuts-and-bolts advice, from object expert Martin Fowler. The author is also an authority on software patterns and UML, and this experience helps make this a better book, one that should be immediately accessible to any intermediate or advanced object-oriented developer. (Just l
 ike patterns, each refactoring tip is presented with a simple name, a "motivation," and examples using Java and UML.) ',1,55.99,NULL);
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (14,'Pragmatic Version Control Using Subversion','This book covers the theory behind version control and how it can help developers become more efficient, work better as a team, and keep on top of software complexity. All projects need version control: it''s the lifeblood of any project''s infrastructure, yet half of all project teams in the U.S. don''t use any version control at all. Many others don''t use it well and end up experiencing time-consuming problems. Version control, done well, is your "undo" button for the project: nothing is final, and mistakes are easily rolled back. This book describes Subversion, the latest and hottest open source version control system, using a recipe-based approach that will get you up and running quickly--and correctly. Learn how to use Subversion the right way--the pragmatic way.',0,20,'pragmatic_version_control.jpg');
-INSERT INTO product (id, title, description, is_available, price, image_name) VALUES (15,'Extreme Programming Explained: Embrace Change',' The book intends to describe what XP is, its guiding principles, and how it works. Simply written, the book avoids case studies and concrete details in demonstrating the efficacy of XP. Instead, it demonstrates how XP relies on simplicity, unit testing, programming in pairs, communal ownership of code, and customer input on software to motivate code improvement during the development process. As the author notes, these principles are not new, but when they''re combined their synergy fosters a new and arguably better way to build and maintain software. Throughout the book, the author presents and explains these principles, such as "rapid feedback" and "play to win," which form the basis of XP.\r\n\r\nGenerally speaking, XP changes the way programmers work. The book is good at delineating new roles for programmers and managers who Beck call
 s "coaches." The most striking characteristic of XP is that programmers work in pairs, and that testing is an intrinsic part of the coding process. In a later section, the author even shows where XP works and where it doesn''t and offers suggestions for migrating teams and organizations over to the XP process. ',1,37.99,NULL);
-CREATE TABLE user (
-  id INTEGER PRIMARY KEY,
-  name varchar(255) default NULL,
-  login varchar(30) default NULL,
-  hashed_password varchar(32) default NULL,
-  email varchar(255) default NULL,
-  is_admin tinyint(1) default NULL,
-  address varchar(255) default NULL
-) ;
-INSERT INTO user (id, name, login, hashed_password, email, is_admin, address) VALUES (1,'Super Admin','admin','202cb962ac59075b964b07152d234b70','admin at example.com',1,NULL);
-INSERT INTO user (id, name, login, hashed_password, email, is_admin, address) VALUES (2,'Ivan','customer','202cb962ac59075b964b07152d234b70','Ivanov',0,'Some address');

Modified: 3.x/examples/shop/settings/db.conf.php
===================================================================
--- 3.x/examples/shop/settings/db.conf.php	2007-07-09 13:53:47 UTC (rev 6122)
+++ 3.x/examples/shop/settings/db.conf.php	2007-07-09 14:52:50 UTC (rev 6123)
@@ -1,3 +1,3 @@
 <?php
-$conf = array('dsn' => 'sqlite://localhost/'.dirname(__FILE__).'/../init/db.sqlite?charset=utf8');
-?>
\ No newline at end of file
+$conf = array('dsn' => 'sqlite://localhost/'.dirname(__FILE__).'/../db/sqlite.db?charset=utf8');
+?>

Modified: 3.x/examples/shop/src/controller/cart/CartCheckoutCommand.class.php
===================================================================
--- 3.x/examples/shop/src/controller/cart/CartCheckoutCommand.class.php	2007-07-09 13:53:47 UTC (rev 6122)
+++ 3.x/examples/shop/src/controller/cart/CartCheckoutCommand.class.php	2007-07-09 14:52:50 UTC (rev 6123)
@@ -54,4 +54,3 @@
   }
 }
 ?>
-



More information about the limb-svn mailing list