Java Web-sites ad Forums #Java Short Notes

From: http://sitestree.com/?p=4922
Categories:Java Short Notes
Tags:
Post Data:2009-01-29 00:27:30

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java Spring Topics: What spring framework brings to the table #Java Short Notes

Java Spring Topics
Knowing the buzzwords does not make anyone a good developer. However, it helps. Being expert in a technology like Spring in one day is not possible, but initially getting familiar with all the aspects is helpful as you will know which Spring feature is required to solve the current problem/situation. Then you can just explore and use that feature. It can always help the software engineers/software architects/project managers/product managers – as it will help to select technologies to use.

  • Traditional way of resolving dependencies – binding interfaces to implementations using a Factory Pattern: Spring does it all using XML.
  • How to write a simple Spring web application: Struts MVC as the front-end, Spring as the middle-tier, Hibernate for the back-end.
  • BeanFactory: the heart of Spring. Topics to learn: BeanFactory Life Cycle, bean definitions, bean properties, dependencies, autowiring, making singleton beans versus prototypes, inversion of control
  • Spring MVC framework: DispatcherServlet, various controllers, handler mappings, view resolvers, validation and internationalization, Spring’s JSP tags
  • Advanced MVC: validation and page decoration, Tiles and SiteMesh to decorate a web application, handling validation and using it in the web business layers, handling exceptions in the control layers, upload files, and send emails
  • View Options: JSP, Velocity, FreeMarker, XSLT, PDF and Excel
  • JasperReports: open source Java reporting tool, excellent tool for rendering printable pages. Supports: PDF, HTML, XLS, CSV, XML
  • Persistence Strategies: Hibernate, JDBC or iBATIS (if database or pre-written sqls are already there)
  • Testing Spring Applications: test-driven spring development. Tools: Easy-Mock, jMock, DBUnit. Controller testing: Cactus for in-container testing, Spring Mocks for Out of container testing. jWebUnit and Canoo’s WebTest for testing web interface
  • AOP: Aspect Oriented Programming
  • Transactions: How spring simplifies declarative and programmatic transactions
  • How to integrate other web-framework into Spring. Web-frameworks: JSF, Struts, Tapestry, WebWork
  • Security: Authentication and authorization using traditional container managed J2EE security features and Acegi Security Framework for Spring. Acegi: protect and prevent method invocations on Spring managed beans, configure Access Control Lists (ACLs)
  • Advanced Form Processing: Using forms and handling common issues (handling non-String types like Integer, Date, and Boolean, drop down lists, check boxes, editing nested objects). Multi-page forms: AbstractWizardFormController, Spring Web Flow

From: http://sitestree.com/?p=4921
Categories:Java Short Notes
Tags:
Post Data:2010-05-08 00:57:04

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Spring Resources #Java Short Notes

From: http://sitestree.com/?p=4914
Categories:Java Short Notes
Tags:
Post Data:2009-04-21 06:03:06

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Spring Applications: Examples #Java Short Notes

From: http://sitestree.com/?p=4913
Categories:Java Short Notes
Tags:
Post Data:2006-11-11 03:02:48

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java Rules #Java Short Notes

  • Do not synchronize an instance variable or a code block without an object – it is illegal in Java
  • a synchronized context: wait(), notifyAll() – may be required to be called
  • Do not add a checked exception to an overridden method
  • A superclass does not have to be serializable, but its constructor will run when a serializable subclass instance is deserialized.
  • Loose coupling: you can change the implementation of a class without affecting the other classes. For example, if two classes say A and B – do not use each other at all (no instantiation of the other or no method calling ), they are not coupled. If A uses B but B does not use A, then they are loosely coupled. If both A and B use each other, then they are tightly coupled.Loose coupling expects that a class should keep its members private and that the other class should access themthrough getters and setters

From: http://sitestree.com/?p=4910
Categories:Java Short Notes
Tags:
Post Data:2010-02-08 12:34:16

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Generics in Java #Java Short Notes

  • Generics can prevent many run time errors.
  • A generic class:
    public class Box {    private T t; // T stands for "Type"              public void add(T t) {        this.t = t;    }    public T get() {        return t;    }}Object creation:
    Box integerBox = new Box();
  • Generic method syntax: public void inspect(U u){}
  • Type Erasure:Check this code:
    public class MyClass {    public static void myMethod(Object item) {        if (item instanceof E) {  //Compiler error            ...        }        E item2 = new E();   //Compiler error        E[] iArray = new E[10]; //Compiler error        E obj = (E)new Object(); //Unchecked cast warning    }}

From: http://sitestree.com/?p=4902
Categories:Java Short Notes
Tags:
Post Data:2007-10-28 07:08:01

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Java: Common Architectures #Java Short Notes

From: http://sitestree.com/?p=4890
Categories:Java Short Notes
Tags:
Post Data:2010-06-02 07:22:23

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

SCEA:Security in Java: Potential threats to a system and how to address the threats:Java Enterprise Architect #Java Short Notes

  • Input Validation Failures: Input should be validated both at the client end and the server end (before any processing). Validating both from trusted and untrusted sources is important. Otherwise code injection attack may happen. Validation should include: data type (string, integer), format, length, range, null-value handling, verifying for character-set, locale, patterns, context, legal values and validity, and so on.
  • Output Sanitation: If you display the user entered values or if the generated output contains a significant use of the input values, in some cases, the user may be able to relate the output to the input. The user may provide malicious data to display say a pop up or an affiliate ad or to break the system.
  • Buffer Overflow: Some users may try to cause buffer overflow and hence, break the system. This may be part of a denial of service attack. Suppose you have set a not null table column to be of size 50 and did not validate the input, then data > 50 chars may break the system based on the operations and platforms. Or a user can just insert huge amount of data to eat up your server resources.
  • Data Injection Flaw: In this case, security intruders can try to pass sql queries as part of their data to get useful information or to break your system.
  • Cross-Site Scripting (XSS):
  • Improper Error Handling: In case of errors, such as, out of memory, null pointer exceptions, system call failure, database access failure, network timeout many applications display detailed internal error messages. Based on the error messages (weak points), hackers may be able to design an attack.
  • Insecure Data Transit or Storage: Data in storage or transit when represented as plain text are vulnerable to attack. Encryption algorithms may help in these situations.
  • Weak Session Identifiers: If you assign session identifiers before user authentication or display session identifier in plain text, hackers may spoof user identity and do harmful business transactions.
  • Weak Security Tokens:
  • Weak Password Exploits: Passwords, many times, can be guessed or watched or retrieved by using password-cracking tools to obtain data from password files. Strong authentication or multifactor authentication mechanisms using digital certificates, biometrics, or smart cards is strongly recommended.
  • Weak Encryption:
  • Session Theft:
  • Insecure Configuration Data:
  • Broken Authentication:
  • Broken Access Control:
  • Policy Failures:
  • Audit and Logging Failures:
  • Denial of Service (DoS) and Distributed DOS (DDoS):
  • Man-in-the-Middle (MITM):
  • Multiple Sign-On Issues:
  • Deployment Problems:
  • Coding Problems:

From: http://sitestree.com/?p=4886
Categories:Java Short Notes
Tags:
Post Data:2013-03-23 01:58:45

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Sun certifications: Topics #Java Short Notes

From: http://sitestree.com/?p=4885
Categories:Java Short Notes
Tags:
Post Data:2008-10-21 15:25:38

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Code Conventions for the Java Programming Language #Java Short Notes

Why Have Code Conventions?

  • 80% of software life cycle is spent on software maintenance.
  • Hardly the original author maintains a software
  • Code Conventions improve the readability of the software
  • If you require to ship your source code as a product, code conventions make your product well packaged

Java Code Conventions

  • Avoid assigning several variables to the same value in a single statement
  • Avoid using an object to access a class (static) variable or method. Use a class name instead
  • Don’t make any instance or class variable public without good reason. When the class is essentially a data structure, you can use public instance variables
  • Two blank lines: Between sections of a source file, between class and interface definitions
  • One blank line: Between methods, between the local variables in a method and its first statement, before a block or single-line, between logical sections inside a method
  • Blank spaces: Between a keyword and parenthesis, after commas in argument lists, after Casts
  • Each line should contain at most one statement
  • One declaration per line is recommended
  • Initialize local variables where they’re declared
  • Put declarations only at the beginning of blocks
  • No space between a method name and the parenthesis
  • Methods are separated by a blank line
  • Four styles of implementation comments: block, single-line, trailing, and end-of-line
  • Documentation comments describe Java classes, interfaces, constructors, methods, and fields. Use /**…*/ for doc comments
  • Doc comments: One comment per class, interface, or member
  • Doc comments: Should appear just before the declaration
  • Avoid lines longer than 80 characters
  • Break longer lines: after a comma, before an operator, Prefer higher-level breaks to lower-level breaks, align new lines with the previous line, or indent the new line with 8 spaces
  • You can get a detailed code conventions at Java Code Conventions

From: http://sitestree.com/?p=4865
Categories:Java Short Notes
Tags:
Post Data:2012-09-01 18:46:01

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada