Thursday, June 18, 2009
IT Primer
Table of Contents
Struts 2. 2
Java Concurrency Package. 2
Spring. 2
UML. 3
Oracle 10g Features. 3
Oracle Indexes. 3
Java 1.5 features. 3
Java Misc. 3
Java Back to basics. 4
Struts 2
1. Based on Open Symphony WebWorks framework
2. Action classes are POJO
3. Action classes are not singleton and can have instance variable
4. No ActionForm
5. Uses interceptors i.e. filters rather than controller servlet
6. ValueStack and OGNL are new features. ValueStack is memory area where the data for the request resides in a stack. OGNL is Object-Graph and Navigation Language, an expression language for accessing values in ValueStack and type conversion.
7. Single Tag Library
8. *.action is default v/s *.do
9. Annotation support
Java Concurrency Package
1. Filling the void by providing support for high level synchronization
2. Executor.execute(runnable), PooledExecutor, QueuedExecutor etc
3. FutureResult (Call back mechanism)
Spring
UML
1. Use Case Diagram: Shows type of objects and static relationship between them.
2. Class Diagram: Attributes and methods
3. Package Diagram: Group classes into package
4. Object Diagram: Shows objects instead of classes, useful for complex objects
5. Sequence Diagram: Interaction diagram what messages are shared between whom and when.
6. Collaboration(Interaction) Diagram: Same as Sequence Diagram, focus on object roles instead of time
7. Statechart Diagram: Shows possible states of object and their transitions that cause change in the state
8. Activity Diagram: Fancy Flowchart
Oracle 10g Features
1. Automatic Shared Memory Management
2. Database tuning improvements (Self and automated)
3. Scheduler utilities through new package dbms_scheduler
4. SQL Regular expressions for search and replace
Oracle Indexes
1. Bitmap: For columns with very few unique values (low cardinality < 1%), Tables that have no or little insert/update are good candidates (static data in warehouse), fast to read, overhead on maintenance
2. B (binary) Tree: Leaf, root, node, order, depth
Java 1.5 features
1. Annotations
2. Generics
3. For loop
4. Auto boxing and un-boxing
5. Var Args
6. Enum
7. Static import
8. Scanner API
9. Format System.out.printf(%s) etc
Java Misc
1. Hotspot is java virtual machine which supports Just in time compilation and adaptive optimization. JIT compiler converts bytecode to native machine code just before the execution. Adaptive optimization is a technique of dynamic recompilation of portions of a program based on the current execution profile.
2. To make a class immutable, do not provide setter methods i.e. the method which could mutate the state of the object. Also make the variables private and final. Make the class final to avoid subclassing. String, Integer, Double etc. are immutable classes
3. Java.util.vector: As of the Java 2 platform v1.2, this class has been retrofitted to implement List, so that it becomes a part of Java's collection framework. Unlike the new collection implementations, Vector is synchronized. The Iterators returned by Vector's iterator and listIterator methods are fail-fast: if the Vector is structurally modified at any time after the Iterator is created, in any way except through the Iterator's own remove or add methods, the Iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the Iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future. The Enumerations returned by Vector's elements method are not fail-fast. Capacity increment can be specified in Vector but not in ArrayList.
4. Java.util.Comparator: int compare(Object O1, Object O2). -1 if O1 less than O2, boolean equals(Object o)
5. TreeMap implements SortedMap
Java Back to basics
1. Overriding: Same name, number and type of parameters and return type, can return subtype, wider access specifier is allowed.
2. Java Class Loaders: 1) BootStrap/Primordial class loader which loads JDK internal classes (rt.jar) 2) Extensions classloader which loads jar from JDK extensions directory (lib/ext) 3) System classloader loads classes from classpath
Database Back to basics
First Normal Form (1NF):
Eliminate duplicative columns from the same table.
Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).
Second Normal Form (2NF):
Remove subsets of data that apply to multiple rows of a table and place them in separate tables.
Create relationships between these new tables and their predecessors through the use of foreign keys.
Third Normal Form (3NF):
Remove columns that are not dependent upon the primary key. (Total)
Fourth Normal Form (4NF):
A relation is in 4NF if it has no multi-valued dependencies. (Course/Book/Teacher : Course-Book and Course-Teacher)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment