background preloader

Architecture

Facebook Twitter

ConnectionPool. JSPLife.png (PNG Image, 958 × 587 pixels) MySQL Commands. This is a list of handy MySQL commands that I use time and time again.

MySQL Commands

At the bottom are statements, clauses, and functions you can use in MySQL. Below that are PHP and Perl API functions you can use to interface with MySQL. To use those you will need to build PHP with MySQL functionality. To use MySQL with Perl you will need to use the Perl modules DBI and DBD::mysql. Below when you see # it means from the unix shell. To login (from unix shell) use -h only if needed. # [mysql dir]/bin/mysql -h hostname -u root -p Create a database on the sql server. mysql> create database [databasename]; List all databases on the sql server. mysql> show databases; Switch to a database. mysql> use [db name]; To see all the tables in the db. mysql> show tables; To see database's field formats. mysql> describe [table name]; To delete a db.

Selectors — Scrapy 0.17.0 documentation. When you’re scraping web pages, the most common task you need to perform is to extract data from the HTML source.

Selectors — Scrapy 0.17.0 documentation

There are several libraries available to achieve this: Scrapy comes with its own mechanism for extracting data. They’re called selectors because they “select” certain parts of the HTML document specified either by XPath or CSS expressions. XPath is a language for selecting nodes in XML documents, which can also be used with HTML. CSS is a language for applying styles to HTML documents. Scrapy selectors are built over the lxml library, which means they’re very similar in speed and parsing accuracy.

Bean. BeanFactory Tutorial. Note: As of 03-Feb-09, we still need to add information about FormBeanFactory.

BeanFactory Tutorial

Hopefully tomorrow. Below is the BeanFactory "thirty-minute" tutorial overview. We expect that a knowledgable Java programmer should be able to read this overview and then use the BeanFactory for the typical cases. Each section below summarizes the key points from a chapter in the BeanFactory manual which contains more complete details of the functions described herein. The sections of this "thirty-minute" tutorial are arranged in the order you would develop your application: To implement your DAO, you will need to utilize the following classes provided by the BeanFactory: Obtain a BeanTable object to create and delete your database table Obtain a BeanFactory object to create and read beans from your table Begin and commit transactions to change beans in the database Use your DAO to read and write instances of your JavaBean: Test your DAO Most of the manual has not yet been written so the links are broken.

Webapp-Project/formbeans/EventProfileForm.java at master · sophaz/Webapp-Project. Overview. Model–view–controller. Model–view–controller (MVC) is a software pattern for implementing user interfaces.

Model–view–controller

It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.[1][2] The central component, the model, consists of application data, business rules, logic and functions. A view can be any output representation of information, such as a chart or a diagram. Multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants.

The third part, the controller, accepts input and converts it to commands for the model or view.[3] Component interactions[edit] A typical collaboration of the MVC components In addition to dividing the application into three kinds of components, the Model–view–controller (MVC) design defines the interactions between them.[4] Use in web applications[edit] History[edit] Actions. Web.xml. View. Web Designer App. JSP. JSTL/EL. JSTL Expression Language (EL),EL, JSTL EL. Format: HTML+JAVA. JSP2. JSP1. Data access object. Although this design pattern is equally applicable to most programming languages, most types of software with persistence needs, and most types of databases, it is traditionally associated with Java EE applications and with relational databases accessed via the JDBC API because of its origin in Sun Microsystems' best practice guidelines[1] ("Core J2EE Patterns") for that platform.

Data access object

Advantages[edit] The advantage of using data access objects is the relatively simple and rigorous separation between two important parts of an application that can and should know almost nothing of each other, and which can be expected to evolve frequently and independently. Changing business logic can rely on the same DAO interface, while changes to persistence logic do not affect DAO clients as long as the interface remains correctly implemented. Tools and frameworks[edit]