Rodney Vg

Rodney Vg


Best Java Frameworks to Use in 2019

If you are just starting with Java, see Java live in action with this blog that will run you through all the important concepts you need to know to start working with the frameworks.

Why frameworks?

Frameworks give a structure to your applications. For example, if we have a proper framework for testing, we can automate a lot of things and get accurate and consistent results. Same way if there are frameworks for ORM, web applications, logging, data management etc… it will make a developer’s life simple and help them concentrate more on business logic rather than worrying about common pieces of code used across a domain or application.

The best Java frameworks

Although there are many frameworks built on Java, here are some very commonly used frameworks of different types – web applications, network applications, logging, testing, ORM etc… Note that each of these has their own benefits and can work best for different business use cases. We cannot say which is better because they are all good in different scenarios.

1. Spring

With its concept of Dependency Injection and aspect-oriented programming features, Spring took the development world by storm. It is an open-source framework used for Enterprise applications.

With Spring, developers can create loosely coupled modules where-in dependencies are handled by the framework rather than depending on the libraries in the code.

Spring framework is exhaustive and covers a lot of features including security and configuration, which are easy to learn. Further, since it is the most popular web framework, you can find a lot of documentation and an active community.

With everything configured, your code will be clean and easy to comprehend.

Main concepts –

  • Dependency Injection (DI) (Inversion of Control) – In this principle, rather than the application taking control of the flow sequentially, it gives the control to an external controller who drives the flow. The external controller is the events. When some event happens, the application flow continues. This gives flexibility to the application. In Spring, IoC is done by DI which are of three types – setter injection, method injection and constructor injection.
  • Beans and Spring Context – In Spring, objects are called as beans and there is a BeanFactory that manages and configures these beans. You can think of the beanfactory as a container that instantiates, configures and manages the beans. Most applications use xml (beans.xml) for the configuration. ApplicationContext which a superset of BeanFactory is used for more complex applications that need event propagation, declarative mechanisms and integration with aspect-oriented features of Spring.
  • Read about some more major spring concepts here.

2. Struts

Apache Struts is another robust open-source framework for web applications. It follows the MVC (Model-View-Controller) model and extends the JSP API. In a traditional servlet-JSP approach, if a user submits let’s say a form with his details, the information then goes to a servlet for processing or the control goes over to next JSP (Java Server Pages – where you can write Java code in an HTML). This becomes confusing for complex applications as the ‘View’ or presentation layer should ideally not have business logic.

Struts separate the View, Controller and the Model (data) and provides the binding between each through a configuration file struts-config.xml.

The controller is an ActionServlet where you can write templates for the View and the user data is maintained using ActionForm JavaBean. The Action object is responsible for forwarding the application flow.

The View is maintained by a rich set of tag libraries.

Struts are easy to set up and provides much more flexibility and extensibility over the traditional MVC approach using servlets and JSP alone. It can be a good starting point for your career as a web developer.

3. Hibernate

Though Hibernate is not a full-stack framework, it completely changed the way we looked at the database. Implementation of Java Persistence API (JPA), Hibernate is an Object-Relational-Mapping (ORM) database for Java applications. Just like SQL, queries in Hibernate are called HQL (Hibernate Query Language).

Hibernate directly maps Java classes to corresponding database tables and vice versa.

The main file in hibernate is the hibernate.cfg.xml file that contains information about mapping Java classes with database configuration.

Hibernate solves the two major problems with JDBC – JDBC doesn’t support object-level relationship and if you ever decide to migrate to a different database, the older queries may not work – meaning a lot of changes – i.e. time and money!

Hibernate provides an abstraction layer so that the code is loosely coupled with the database. Stuff like establishing a database connection, performing CRUD operations are taken care of by Hibernate – so developers need not implement that, hence making the code independent of the database used.

Choose one or more from these beginner and advanced courses to get a complete overview of Hibernate and JPA.

4. Apache Wicket

If you have already worked with JSP, the learning wicket will be a cakewalk. A simple web application framework, Wicket has a component-oriented structure and all you need to know is Java and HTML. Absolutely no XMLs or configuration files!

The main feature of Wicket is it POJO model wherein components are simple (Plain Old) Java Objects having OOP features. These components are bundled together as reusable packages with images, buttons, forms, links, pages, containers, behaviours and more so that developers can customize them.

Wicket is light-weight and you can build applications really fast. It is also easy to unit test code written in Wicket.

5. JSF (Java Server Faces)

Don’t confuse JSF with JSP, which is just a text document that can have static and dynamic content. JSF is developed by Oracle as a part of the Java Enterprise Edition 7.

It is a component-based MVC framework and has reusable UI components for server-based applications. The main idea is to encapsulate various client-side technologies like CSS, JavaScript, and HTML that will allow developers to create UI without knowing any of these technologies in-depth. They can just drag and drop UI components and focus more on their presentation layer specifics.

The default templating system in JSF is the FaceLets. JSF is quite similar to Struts.

JSF can be further seamlessly integrated with AJAX-enabled components to enrich the user experience by adding Ajax events for validations and method invocations.

Check out this LinkedIn course to know more about JSF.

6. Dropwizard

Another Java framework true to its name – wizard. This light-weight framework lets you complete your application very fast because of it’s out of the box support for advanced configurations, logging, application metrics and much more. You can create RESTful web applications that give high performance, are stable and reliable.

Dropwizard is especially magical because it brings together a host of libraries like Jetty, Guava, Jersey, Jackson, and Metrics amongst many others from the Java ecosystem into one framework and gives you a light-weight and lean application.

Since there are integrated libraries for all the configurations, security and performance-related tasks, all you need to do as a developer is building your business logic.

Dropwizard is an open-source framework that is bundled with libraries and you can easily set it up with Eclipse IDE and create a simple project to learn (Believe me, you can learn Dropwizard on your own!). The basic tutorial from Dropwizard website will help you through each step.

7. Grails

Grails is an easy to learn full-stack framework much suitable for those who are just beginning their programming career. While Grails is a web framework written in Groovy programming language, it runs on Java platform and is perfectly compatible with Java syntax. This framework is based on the MVC design pattern.

Groovy is similar to Java which some more features added when compared to Java. It is very easy to learn Groovy if you already know Java.

Similar to JSP, in Grails, the rendering technology is GSP (Groovy Server Pages). Creating tags for the View in Grails is simple and easy. It also uses GORM which as you might have guessed is the ORM implementation used in Grails. You can also directly use Hibernate instead of GORM. Grails has built-in support for RESTful APIs thus making it easy to create such services.

Here comes the best part – you can integrate your existing java code with Grails. If you have a mix of Groovy and Java code in your application – it will work just fine!

The best way to learn Grails is to set up your own development environment using any Java IDE like Eclipse, NetBeans etc… and follow any of these tutorials to build your first web application.

8. ATG

ATG is a web commerce platform written in Java. It is a customizable and configurable framework, particularly useful for websites related to e-commerce. The product is owned by Oracle and supports both B2B and B2C applications that are complex and huge. For small scale applications, it could be costly, however. If you are getting into developing e-commerce websites, ATG is a good framework to learn and will enrich your technical as well as domain knowledge.

ATG platform can run on three servers – Oracle Weblogic, IBM Websphere, and JBoss.

There are 3 main layers in the framework –

  • The Dynamo Application Framework – it is the base layer that provides a development environment based on JavaBeans and JSP. There are standard ATG classes for all the common functionalities and even custom Java code can be created and assembled out of component beans by linking them through configuration files.
  • The Personalization module – This is where the content for each user is customized dynamically. This module helps control and maintain user-profiles and business rules that define what content is to be shown to a particular user. This layer also supports targeted emails.
  • The Scenarios module – This module further enhances the capabilities of the personalization module by introducing time-sensitive, event-driven campaigns that manage interactions between site visitors and the content for a period of time. For example, limited time offers, exclusive deals for certain members etc…

ATG is an extensive framework and you need time and patience to learn it. Several big companies like Walmart, Macy’s, BestBuy, ASDA and more have their website built on ATG.

9. Play

Play is a slightly conventional and unique type of framework that follows the approach of convention over configuration. It is based on the MVC pattern and is an open-source web application framework. Apart from Java, you can write Play web applications in Scala.

Play is similar to Django or Ruby on Rails or ASP.NET architecture and doesn’t necessarily follow J2EE web standards.

Some features of Play are –

  • High performance because of the asynchronous processing
  • No container, no states and built on reactive principles
  • Uses statically-typed language, so most errors are caught during compile time saving a lot of mistakes early in the development life-cycle.
  • Scala explores true OOP along with some functional programming concepts. Its compatibility with Java makes for an excellent and powerful system.
  • With Play2, a new powerful build system sbt has been released which makes it easy to integrate with Maven projects as well as create simple JAR files.
  • Extensive relational database access libraries for common functionalities are in-built.

10. Apache Hadoop

Though Apache Hadoop is not a full-stack framework, it provides a software framework and works on the MapReduce programming model. These utilities can easily handle huge volumes of data (Big Data), store, analyse and process them to provide faster and more efficient results.

I have included Hadoop in this list because it is the ‘thing’ of today with Big Data gaining prominence.

Hadoop helps in distributed data storage and processing using the master slave design pattern. The Hadoop HDFS (Hadoop Distributed File System) layer of the master node (namely NameNode) has the data node. The MapReduce layer has the JobTracker and the tasktracker. The slave nodes have the Data node and the taskTracker respectively.

HDFS divides the files into set of blocks and these are replicated across the cluster.

If you want to familiarize yourself with big data and data science – Hadoop is your place to start. Learn Hadoop easily through these tutorials.

11. GWT

Google Web Toolkit (GWT) is a framework obviously created by Google to create rich internet applications in Java. One of the best features of GWT is that it converts Java code into JavaScript code – that too custom code based on the browser. I personally like this feature because, during development, we used to spend a lot of time and effort on the browser testing earlier. With this open-source set of tools, we can write highly performant web applications in less time. If you already have a codebase, you can easily integrate it with GWT because GWT is compatible with the Eclipse IDE, Maven and Junit too. The framework also provides extensive widget libraries that can perform most of the tasks making it easy for even a beginner in Java to develop business logic without worrying too much about basic stuff. There are 3 major components of the GWT framework – the Java to JS compiler, the JRE emulation library that sits on top of the core JRE library and the GWT UI building library that includes the UI components, history management, and many more features.

Get started with learning GWT here.

12. Vaadin

Vaadin is a flagship product and also a platform where developers can do HTML5 web UI implementation using Java. It is an open-source platform that includes the Java web framework and a set of web components along with application starters and tools. These web components form the core of Vaadin and can be customized leading to high performance and versatile code for desktop and mobile apps.

Vaadin flow is the actual Java framework part of the Vaadin platform that takes care of the client-server communication as well as routing. With Vaadin flow, you can write your web application completely in Java without the fuss of JS or CSS. The UI components take care of the browser activities of the user using automated communication to and forth browser and server. You can easily integrate Vaadin components into any IDE that you are using plus it is a cross-platform framework, so no need to worry about migrating the code into a different platform.

It is a whole new approach to build Java applications so that you can concentrate on the presentation layer alone without worrying about client-server communications. It also has Data Binding API that maps UI components to the database using type-safe Java code and abstraction layers so that you can build reusable components in UI using HTML templates and Java both.

13. Spark

Another masterstroke from Apache, Spark is an open-source web development framework which has similar features as Spring, Play and JAX-RS, but is more powerful and doesn’t follow the traditional MVC design pattern.

It is a micro-framework and a domain-specific language for Java focussing on the speed of development. It needs very less configuration and coding. It is 10 times faster than Hadoop in terms of data processing because of in-memory computation. A completely dynamic framework, Spark supports lazy initialization and real-time data processing.

It is also easy to integrate with Scala and R which are programming languages focused on data science and big data. The primary objective of Spark is processing huge data and also supports advanced analytics with SQL queries, machine learning and graph algorithms.

Don’t think that Spark can replace Hadoop – it can be an extension to the features that Hadoop offers – learning both these frameworks will give you an edge over others if you are getting into Data Science field.

14. OpenXava

A low-code platform for developing web applications in a fast manner, you can get your business applications up and running in record time. It consists of business components that make building even complex applications easy and hassle-free for developers. Extensible, customizable and OO in true sense, OpenXava uses Java classes as its core to model the business problem. Such a model-driven development approach ensures encapsulation. Developers only define the model as plain annotated Java classes and the necessary functionalities are all generated during run time.

The structure and philosophy of OpenXava follow a business component architecture as opposed to the traditional MVC architecture. Here everything is a business concept and all the artifacts contributing to a certain business concept are in the same place be it the associated View, Model or Controller.

You should definitely read the concept behind this language here before you learn this framework.

15. Vert.X

Developed by Eclipse, Vert.x is an event-driven application framework that uses many languages like Java, JS, Groovy, Scala and more. It is thus polyglot in nature. It relies upon the asynchronous programming model thus making the applications non-blocking and free from multi-threading.

Vert.x can be said as more of a toolkit that provides APIs in multiple languages to perform asynchronous tasks that all the web applications need – logging, authentication, monitoring, DB connectivity, multi-cluster support etc… There are 2 main concepts in Vert.x –

  • Verticle – Just like any other asynchronous model, there is an event loop which has events like messages, network buffers, HTTP request, etc. Each event from the event loop is processed by the Verticle.
  • Event bus – Different verticles communicate with each other using the event bus. This is done through asynchronous message passing. Event bus can perform different types of messaging like point to point, broadcast and request-response.

The best thing about Vert.x is its non-blocking nature which makes the web applications highly performant. The framework can be used for any application – small, medium or large-scale. If you already know Node.js, you will appreciate Vert.x more, because it has all the features of Node.js plus the benefit of Java Virtual machine which makes for a powerful and robust combination.

16. Tapestry

Conceptually, Tapestry is similar to JSF and Wicket. It is an open-source, cross-platform, component-based web application development framework which can create highly scalable applications. Built upon the rich Java Servlet API, it works on any container or application server. Tapestry is a true Object-oriented framework because you create HTML pages using pure HTML templates or plain java class (objects). There is almost no XML configuration required, Tapestry rather uses annotations, thus making the code simple and easy to manage.

With Tapestry, application down-time is minimal because any changes even to a Java class can be hot-swapped without requiring a server restart. Tapestry also takes care of URL construction and redirections. Unlike other frameworks, here the framework adapts to the code and not vice versa.

Some of the out of the box functionalities of Tapestry are – file upload, pagination, field validations, date and calendar logics, internalization, showing pop-ups etc…

It is easy to integrate Tapestry code with back-end frameworks like Spring, Hibernate, etc… and testing frameworks like Selenium.

17. Jersey

Jersey is a web services framework to create RESTful servicesand supports JAX-RS APIs. It greatly simplifies the development of RESTful services through useful features and utility functions. Jersey provides a sort of abstraction layer so that developers need not worry about the low-level implementation of client-server communication and can concentrate on the main web service functionality.

A striking feature of Jersey, as opposed to any other RESTful frameworks, is that it allows for Chunked output i.e. the server can send back a response to a client in parts or chunks. This is useful when a large data has to be sent and data chunks can be sent while the entire response is prepared.

Jersey also comes with easy testing infrastructure. You can write lightweight integration tests that are primarily based on Junit. It is also easy to integrate the tests with Maven environment. All you need to do is add the dependency in your pom.xml.

18. OSGi

OSGi or Open Service Gateway initiative defines a component-based system. It is a popular Java framework where each component is called a bundle. Each bundle has an independent lifecycle and is not dependent on other bundles. Consider the bundle to be jar file with OSGi-specific headers. Bundles have to explicitly declare the packages they need access to without which the OSGi platform will not start.

Bundles use the JVM-level service registry to discover, publish and bind bundles as services. This is the essence of OSGi – for a modular application architecture promoting adaptability and quick changes without much application down-time (run-time flexibility).

OSGi is mainly popular because of its easy integration with eclipse and maven-based projects.

OSGi has some good concept and benefits, yet because of individual independent bundles versioning could be an issue. This could be one major disadvantage of using this framework over others. However, it is worth investing some time on this framework because of the benefits of modularity and isolated class loading that are important concepts for a developer. Read this article to know more about what you should and shouldn’t be learning about OSGi.

19. Drools

Drools is a popular Business Rules Management System. It has a Business Rules Engine (BRE), authoring, a rules management application and runtime support for Decision and Notation models. The rules management app is called as the Drools workbench. The project is backed by RedHat and JBoss. With Drools, developers can easily separate the data from business logic. The two main steps in Drools are –

Authoring – Creation of rule files

Runtime – where you execute the rules

The most important feature of Drools is that new rules can be removed and added at any time without restarting the server.

Drools is apt choice for applications that rely on a lot of conditions for some action to happen. For example, to check if a person is eligible for upgrading his plan or not, there are certain set rules – for example, is the customer existing, the customer’s bill amount is greater than the certain limit and so on. These rules can be defined as a decision table rather than hard coding them in the code. Any changes would then not need another build, complete testing or redeployment!

20. MyBatis

A free software by Apache, MyBatis is a persistence framework in Java where Java methods are mapped with SQL statements, unlike ORM which maps Java objects to tables in the database. The mapping engine maps the SQL results into object trees using XML descriptors or annotations in a declarative way.

In a lot of ways, MyBatis is better than JDBC and Hibernate. MyBatis can dynamically generate SQL statements separating them from the code. It also offers query caching for easy access. The API is very simple and you need not be an expert in SQL or database to be able to write MyBatis code.

MyBatis is a good alternative to Hibernate and JDBC when your application is not too complex and you want simple out of the box features like database connectivity, transaction management, loading the database driver, managing and releasing connections and so on done by the framework. MyBatis can also be integrated easily with the Spring framework.

21. Apache Mina

Apache Mina is a network application framework with which developers can easily create highly scalable and performant network applications. Whether you use TCP/IP, UDP, LDAP, NTP, DNS etc… or a custom protocol, Mina has unified APIs for all the transports. The framework can provide high-level and low-level network APIs. Mina completely handles the I/O operations helping the developers to concentrate fully on business logic and other application needs. It is easy to test the code written with the help of mock objects. You can easily learn Mina using the Eclipse IDE. It can be integrated with popular frameworks like Spring and PicoContainer making it a popular choice for network applications.

MINA is better than SOAP and is more stable and reliable. It has a rich networking library to handle concurrent threads.

Learn more about Apache Mina from their official page.

There are many other frameworks which are not full-stack or web development frameworks but are useful in every application – like log4j for logging, Junit, and Selenium for testing and so on. It is essential to know about these though you can just learn them on the go along with the other frameworks that you have seen in the above list.

Wikipedia provides a complete list of Java frameworks, libraries, and tools that can be overwhelming sometimes. The best framework for your application should meet your business requirements, provide a certain level of flexibility and optimum performance and be easy to maintain and absorb changes. For example, for a full stack web development framework, if something has to be changed, it should least impact the application i.e. you shouldn’t have to build and deploy the application again for small changes. Just a configuration change should do the magic. Such applications save down-time and provide flexibility. Choose your application framework wisely to enjoy the features that Java provides.

Recommended Reading

Guide to Spring WebFlux

Java and Scala: Why Should You Learn Scala?

Java - Get Differences Between Two Objects

How to use Java Executor framework for Multithreading

Send Email in Java

Achieving Functional Programming in Java

Functional Programming? Don’t Even Bother, It’s a Silly Toy

Java 11 & Spring Boot 2.2 Tutorial: Build your First REST API App

Java Reflection API Tutorial


What is GEEK

Buddha Community

Best Java Frameworks to Use in 2019
Tyrique  Littel

Tyrique Littel


How to Install OpenJDK 11 on CentOS 8

What is OpenJDK?

OpenJDk or Open Java Development Kit is a free, open-source framework of the Java Platform, Standard Edition (or Java SE). It contains the virtual machine, the Java Class Library, and the Java compiler. The difference between the Oracle OpenJDK and Oracle JDK is that OpenJDK is a source code reference point for the open-source model. Simultaneously, the Oracle JDK is a continuation or advanced model of the OpenJDK, which is not open source and requires a license to use.

In this article, we will be installing OpenJDK on Centos 8.

#tutorials #alternatives #centos #centos 8 #configuration #dnf #frameworks #java #java development kit #java ee #java environment variables #java framework #java jdk #java jre #java platform #java sdk #java se #jdk #jre #open java development kit #open source #openjdk #openjdk 11 #openjdk 8 #openjdk runtime environment

bindu singh

bindu singh


Procedure To Become An Air Hostess/Cabin Crew

Minimum educational required – 10+2 passed in any stream from a recognized board.

The age limit is 18 to 25 years. It may differ from one airline to another!


Physical and Medical standards –

  • Females must be 157 cm in height and males must be 170 cm in height (for males). This parameter may vary from one airline toward the next.
  • The candidate's body weight should be proportional to his or her height.
  • Candidates with blemish-free skin will have an advantage.
  • Physical fitness is required of the candidate.
  • Eyesight requirements: a minimum of 6/9 vision is required. Many airlines allow applicants to fix their vision to 20/20!
  • There should be no history of mental disease in the candidate's past.
  • The candidate should not have a significant cardiovascular condition.

You can become an air hostess if you meet certain criteria, such as a minimum educational level, an age limit, language ability, and physical characteristics.

As can be seen from the preceding information, a 10+2 pass is the minimal educational need for becoming an air hostess in India. So, if you have a 10+2 certificate from a recognized board, you are qualified to apply for an interview for air hostess positions!

You can still apply for this job if you have a higher qualification (such as a Bachelor's or Master's Degree).

So That I may recommend, joining Special Personality development courses, a learning gallery that offers aviation industry courses by AEROFLY INTERNATIONAL AVIATION ACADEMY in CHANDIGARH. They provide extra sessions included in the course and conduct the entire course in 6 months covering all topics at an affordable pricing structure. They pay particular attention to each and every aspirant and prepare them according to airline criteria. So be a part of it and give your aspirations So be a part of it and give your aspirations wings.

Read More:   Safety and Emergency Procedures of Aviation || Operations of Travel and Hospitality Management || Intellectual Language and Interview Training || Premiere Coaching For Retail and Mass Communication |Introductory Cosmetology and Tress Styling  ||  Aircraft Ground Personnel Competent Course

For more information:

Visit us at:

Phone         : 

Address:     Aerofly International Aviation Academy, SCO 68, 4th Floor, Sector 17-D,                            Chandigarh, Pin 160017 



#air hostess institute in Delhi, 

#air hostess institute in Chandigarh, 

#air hostess institute near me,

#best air hostess institute in India,
#air hostess institute,

#best air hostess institute in Delhi, 

#air hostess institute in India, 

#best air hostess institute in India,

#air hostess training institute fees, 

#top 10 air hostess training institute in India, 

#government air hostess training institute in India, 

#best air hostess training institute in the world,

#air hostess training institute fees, 

#cabin crew course fees, 

#cabin crew course duration and fees, 

#best cabin crew training institute in Delhi, 

#cabin crew courses after 12th,

#best cabin crew training institute in Delhi, 

#cabin crew training institute in Delhi, 

#cabin crew training institute in India,

#cabin crew training institute near me,

#best cabin crew training institute in India,

#best cabin crew training institute in Delhi, 

#best cabin crew training institute in the world, 

#government cabin crew training institute

Chloe  Butler

Chloe Butler


Pdf2gerb: Perl Script Converts PDF Files to Gerber format


Perl script converts PDF files to Gerber format

Pdf2Gerb generates Gerber 274X photoplotting and Excellon drill files from PDFs of a PCB. Up to three PDFs are used: the top copper layer, the bottom copper layer (for 2-sided PCBs), and an optional silk screen layer. The PDFs can be created directly from any PDF drawing software, or a PDF print driver can be used to capture the Print output if the drawing software does not directly support output to PDF.

The general workflow is as follows:

  1. Design the PCB using your favorite CAD or drawing software.
  2. Print the top and bottom copper and top silk screen layers to a PDF file.
  3. Run Pdf2Gerb on the PDFs to create Gerber and Excellon files.
  4. Use a Gerber viewer to double-check the output against the original PCB design.
  5. Make adjustments as needed.
  6. Submit the files to a PCB manufacturer.

Please note that Pdf2Gerb does NOT perform DRC (Design Rule Checks), as these will vary according to individual PCB manufacturer conventions and capabilities. Also note that Pdf2Gerb is not perfect, so the output files must always be checked before submitting them. As of version 1.6, Pdf2Gerb supports most PCB elements, such as round and square pads, round holes, traces, SMD pads, ground planes, no-fill areas, and panelization. However, because it interprets the graphical output of a Print function, there are limitations in what it can recognize (or there may be bugs).

See docs/Pdf2Gerb.pdf for install/setup, config, usage, and other info.

#Pdf2Gerb config settings:
#Put this file in same folder/directory as itself (global settings),
#or copy to another folder/directory with PDFs if you want PCB-specific settings.
#There is only one user of this file, so we don't need a custom package or namespace.
#NOTE: all constants defined in here will be added to main namespace.
#package pdf2gerb_cfg;

use strict; #trap undef vars (easier debug)
use warnings; #other useful info (easier debug)

#configurable settings:
#change values here instead of in main file

use constant WANT_COLORS => ($^O !~ m/Win/); #ANSI colors no worky on Windows? this must be set < first DebugPrint() call

#just a little warning; set realistic expectations:
#DebugPrint("${\(CYAN)} ${\(VERSION)}, $^O O/S\n${\(YELLOW)}${\(BOLD)}${\(ITALIC)}This is EXPERIMENTAL software.  \nGerber files MAY CONTAIN ERRORS.  Please CHECK them before fabrication!${\(RESET)}", 0); #if WANT_DEBUG

use constant METRIC => FALSE; #set to TRUE for metric units (only affect final numbers in output files, not internal arithmetic)
use constant APERTURE_LIMIT => 0; #34; #max #apertures to use; generate warnings if too many apertures are used (0 to not check)
use constant DRILL_FMT => '2.4'; #'2.3'; #'2.4' is the default for PCB fab; change to '2.3' for CNC

use constant WANT_DEBUG => 0; #10; #level of debug wanted; higher == more, lower == less, 0 == none
use constant GERBER_DEBUG => 0; #level of debug to include in Gerber file; DON'T USE FOR FABRICATION
use constant WANT_STREAMS => FALSE; #TRUE; #save decompressed streams to files (for debug)
use constant WANT_ALLINPUT => FALSE; #TRUE; #save entire input stream (for debug ONLY)

#DebugPrint(sprintf("${\(CYAN)}DEBUG: stdout %d, gerber %d, want streams? %d, all input? %d, O/S: $^O, Perl: $]${\(RESET)}\n", WANT_DEBUG, GERBER_DEBUG, WANT_STREAMS, WANT_ALLINPUT), 1);
#DebugPrint(sprintf("max int = %d, min int = %d\n", MAXINT, MININT), 1); 

#define standard trace and pad sizes to reduce scaling or PDF rendering errors:
#This avoids weird aperture settings and replaces them with more standardized values.
#(I'm not sure how photoplotters handle strange sizes).
#Fewer choices here gives more accurate mapping in the final Gerber files.
#units are in inches
use constant TOOL_SIZES => #add more as desired
#round or square pads (> 0) and drills (< 0):
    .010, -.001,  #tiny pads for SMD; dummy drill size (too small for practical use, but needed so StandardTool will use this entry)
    .031, -.014,  #used for vias
    .041, -.020,  #smallest non-filled plated hole
    .051, -.025,
    .056, -.029,  #useful for IC pins
    .070, -.033,
    .075, -.040,  #heavier leads
#    .090, -.043,  #NOTE: 600 dpi is not high enough resolution to reliably distinguish between .043" and .046", so choose 1 of the 2 here
    .100, -.046,
    .115, -.052,
    .130, -.061,
    .140, -.067,
    .150, -.079,
    .175, -.088,
    .190, -.093,
    .200, -.100,
    .220, -.110,
    .160, -.125,  #useful for mounting holes
#some additional pad sizes without holes (repeat a previous hole size if you just want the pad size):
    .090, -.040,  #want a .090 pad option, but use dummy hole size
    .065, -.040, #.065 x .065 rect pad
    .035, -.040, #.035 x .065 rect pad
    .001,  #too thin for real traces; use only for board outlines
    .006,  #minimum real trace width; mainly used for text
    .008,  #mainly used for mid-sized text, not traces
    .010,  #minimum recommended trace width for low-current signals
    .015,  #moderate low-voltage current
    .020,  #heavier trace for power, ground (even if a lighter one is adequate)
    .030,  #heavy-current traces; be careful with these ones!
#Areas larger than the values below will be filled with parallel lines:
#This cuts down on the number of aperture sizes used.
#Set to 0 to always use an aperture or drill, regardless of size.
use constant { MAX_APERTURE => max((TOOL_SIZES)) + .004, MAX_DRILL => -min((TOOL_SIZES)) + .004 }; #max aperture and drill sizes (plus a little tolerance)
#DebugPrint(sprintf("using %d standard tool sizes: %s, max aper %.3f, max drill %.3f\n", scalar((TOOL_SIZES)), join(", ", (TOOL_SIZES)), MAX_APERTURE, MAX_DRILL), 1);

#NOTE: Compare the PDF to the original CAD file to check the accuracy of the PDF rendering and parsing!
#for example, the CAD software I used generated the following circles for holes:
#CAD hole size:   parsed PDF diameter:      error:
#  .014                .016                +.002
#  .020                .02267              +.00267
#  .025                .026                +.001
#  .029                .03167              +.00267
#  .033                .036                +.003
#  .040                .04267              +.00267
#This was usually ~ .002" - .003" too big compared to the hole as displayed in the CAD software.
#To compensate for PDF rendering errors (either during CAD Print function or PDF parsing logic), adjust the values below as needed.
#units are pixels; for example, a value of 2.4 at 600 dpi = .0004 inch, 2 at 600 dpi = .0033"
use constant
    HOLE_ADJUST => -0.004 * 600, #-2.6, #holes seemed to be slightly oversized (by .002" - .004"), so shrink them a little
    RNDPAD_ADJUST => -0.003 * 600, #-2, #-2.4, #round pads seemed to be slightly oversized, so shrink them a little
    SQRPAD_ADJUST => +0.001 * 600, #+.5, #square pads are sometimes too small by .00067, so bump them up a little
    RECTPAD_ADJUST => 0, #(pixels) rectangular pads seem to be okay? (not tested much)
    TRACE_ADJUST => 0, #(pixels) traces seemed to be okay?
    REDUCE_TOLERANCE => .001, #(inches) allow this much variation when reducing circles and rects

#Also, my CAD's Print function or the PDF print driver I used was a little off for circles, so define some additional adjustment values here:
#Values are added to X/Y coordinates; units are pixels; for example, a value of 1 at 600 dpi would be ~= .002 inch
use constant
    CIRCLE_ADJUST_MINY => -0.001 * 600, #-1, #circles were a little too high, so nudge them a little lower
    CIRCLE_ADJUST_MAXX => +0.001 * 600, #+1, #circles were a little too far to the left, so nudge them a little to the right
    SUBST_CIRCLE_CLIPRECT => FALSE, #generate circle and substitute for clip rects (to compensate for the way some CAD software draws circles)
    WANT_CLIPRECT => TRUE, #FALSE, #AI doesn't need clip rect at all? should be on normally?
    RECT_COMPLETION => FALSE, #TRUE, #fill in 4th side of rect when 3 sides found

#allow .012 clearance around pads for solder mask:
#This value effectively adjusts pad sizes in the TOOL_SIZES list above (only for solder mask layers).
use constant SOLDER_MARGIN => +.012; #units are inches

#line join/cap styles:
use constant
    CAP_NONE => 0, #butt (none); line is exact length
    CAP_ROUND => 1, #round cap/join; line overhangs by a semi-circle at either end
    CAP_SQUARE => 2, #square cap/join; line overhangs by a half square on either end
    CAP_OVERRIDE => FALSE, #cap style overrides drawing logic
#number of elements in each shape type:
use constant
    RECT_SHAPELEN => 6, #x0, y0, x1, y1, count, "rect" (start, end corners)
    LINE_SHAPELEN => 6, #x0, y0, x1, y1, count, "line" (line seg)
    CURVE_SHAPELEN => 10, #xstart, ystart, x0, y0, x1, y1, xend, yend, count, "curve" (bezier 2 points)
    CIRCLE_SHAPELEN => 5, #x, y, 5, count, "circle" (center + radius)
#const my %SHAPELEN =
#Readonly my %SHAPELEN =>
    rect => RECT_SHAPELEN,
    line => LINE_SHAPELEN,
    curve => CURVE_SHAPELEN,
    circle => CIRCLE_SHAPELEN,

#This will repeat the entire body the number of times indicated along the X or Y axes (files grow accordingly).
#Display elements that overhang PCB boundary can be squashed or left as-is (typically text or other silk screen markings).
#Set "overhangs" TRUE to allow overhangs, FALSE to truncate them.
#xpad and ypad allow margins to be added around outer edge of panelized PCB.
use constant PANELIZE => {'x' => 1, 'y' => 1, 'xpad' => 0, 'ypad' => 0, 'overhangs' => TRUE}; #number of times to repeat in X and Y directions

# Set this to 1 if you need TurboCAD support.
#$turboCAD = FALSE; #is this still needed as an option?

#CIRCAD pad generation uses an appropriate aperture, then moves it (stroke) "a little" - we use this to find pads and distinguish them from PCB holes. 
use constant PAD_STROKE => 0.3; #0.0005 * 600; #units are pixels
#convert very short traces to pads or holes:
use constant TRACE_MINLEN => .001; #units are inches
#use constant ALWAYS_XY => TRUE; #FALSE; #force XY even if X or Y doesn't change; NOTE: needs to be TRUE for all pads to show in FlatCAM and ViewPlot
use constant REMOVE_POLARITY => FALSE; #TRUE; #set to remove subtractive (negative) polarity; NOTE: must be FALSE for ground planes

#PDF uses "points", each point = 1/72 inch
#combined with a PDF scale factor of .12, this gives 600 dpi resolution (1/72 * .12 = 600 dpi)
use constant INCHES_PER_POINT => 1/72; #0.0138888889; #multiply point-size by this to get inches

# The precision used when computing a bezier curve. Higher numbers are more precise but slower (and generate larger files).
#$bezierPrecision = 100;
use constant BEZIER_PRECISION => 36; #100; #use const; reduced for faster rendering (mainly used for silk screen and thermal pads)

# Ground planes and silk screen or larger copper rectangles or circles are filled line-by-line using this resolution.
use constant FILL_WIDTH => .01; #fill at most 0.01 inch at a time

# The max number of characters to read into memory
use constant MAX_BYTES => 10 * M; #bumped up to 10 MB, use const

use constant DUP_DRILL1 => TRUE; #FALSE; #kludge: ViewPlot doesn't load drill files that are too small so duplicate first tool

my $runtime = time(); #Time::HiRes::gettimeofday(); #measure my execution time

print STDERR "Loaded config settings from '${\(__FILE__)}'.\n";
1; #last value must be truthful to indicate successful load


#use Package::Constants;
#use Exporter qw(import); #

#my $caller = "pdf2gerb::";

#sub cfg
#    my $proto = shift;
#    my $class = ref($proto) || $proto;
#    my $settings =
#    {
#        $WANT_DEBUG => 990, #10; #level of debug wanted; higher == more, lower == less, 0 == none
#    };
#    bless($settings, $class);
#    return $settings;

#use constant HELLO => "hi there2"; #"main::HELLO" => "hi there";
#use constant GOODBYE => 14; #"main::GOODBYE" => 12;

#print STDERR "read cfg file\n";

#our @EXPORT_OK = Package::Constants->list(__PACKAGE__); #; NOTE: "_OK" skips short/common names

#print STDERR scalar(@EXPORT_OK) . " consts exported:\n";
#foreach(@EXPORT_OK) { print STDERR "$_\n"; }
#my $val = main::thing("xyz");
#print STDERR "caller gave me $val\n";
#foreach my $arg (@ARGV) { print STDERR "arg $arg\n"; }

Download Details:

Author: swannman
Source Code:

License: GPL-3.0 license


Joseph  Murray

Joseph Murray


7 Test Frameworks To Follow in 2021 for Java/Fullstack Developers

It is time to learn new test frameworks in 2021 to improve your code quality and decrease the time of your testing phase. Let’s explore 6 options for devs.

It is time to learn new test frameworks to improve your code quality and decrease the time of your testing phase. I have selected six testing frameworks that sound promising. Some have existed for quite a long time but I have not heard about them before.

At the end of the article, please tell me what you think about them and what your favorite ones are.

Robot Framework

Robot Framework is a generic open-source automation framework. It can be used for test automation and robotic process automation (RPA).

Robot Framework is open and extensible and can be integrated with virtually any other tool to create powerful and flexible automation solutions. Being open-source also means that Robot Framework is free to use without licensing costs.

The RoboFramework is a framework** to write test cases and automation processes.** It means that it may replace** your classic combo Selenium + Cucumber + Gherkins**. To be more precise, the Cucumber Gherkins custom implementation you wrote will be handled by RoboFramework and Selenium invoked below.

For the Java developers, this framework can be executed with Maven or Gradle (but less mature for the latter solution).

#java #testing #test #java framework #java frameworks #testing and developing #java testing #robot framework #test framework #2021

Joseph  Murray

Joseph Murray


Why We Need Collection Framework in Java?

A framework is a set of classes and interfaces which provide a ready-made architecture. In order to implement a new feature or a class, there is no need to define a framework. However, an optimal object-oriented design always includes a framework with a collection of classes such that all the classes perform the same kind of task. Before Collection Framework(or before JDK 1.2) was introduced, the standard methods for grouping Java objects (or collections) were Arrays or Vectors, or Hash tables. All of these collections had no common interface. Therefore, though the main aim of all the collections is the same, the implementation of all these collections was defined independently and had no correlation among them. And also, it is very difficult for the users to remember all the different methods, syntax, and constructors present in every collection class.

Collection Framework is a powerful framework in java. This framework defines the most common methods that can be used for any collection of objects. But the question arises that we have an array concept in java then why we need collection framework in java? Now let’s see that why we need collection framework in java with some valid points of difference between array and collection.

#java #java-collections #why we need collection framework in java #java collections framework #framework in java