GRAILS : an Open Source Framework for Rapid App Development

Total Page:16

File Type:pdf, Size:1020Kb

GRAILS : an Open Source Framework for Rapid App Development { Developer { GRAILS: An Open Source Framework for Rapid App Development Groovy on Rails (GRAILS) framework is a typical Model View Controller Architecture (MVC) with Groovy as a high level Java wrap around language built upon the J2EE framework and is very easy to use even for non-Java programmers — Rahul Kumar ou might get confused with the name of a musical band group but here we will talk SNAPSHOT about a serious technology. The framework Yis inspired by Ruby on Rails that makes Applies to: Java developers use of Groovy language which is a dynamic and agile USP: Rapid application development, Based on Coding by scripting language. The syntax is somewhat very Convention paradigm similar to that of Java. In fact, you can use groovyc Primary Link: http://grails.org/ just like javac to produce bytecode files. Also, Groovy integrates with Bean scripting framework, which Search Engine Keywords: Grails, Grails framework allows you to embed any scripting engine into your Java code. It is intended to be a high-productivity framework by following the “coding by convention” paradigm, providing a stand-alone development environment and hiding much of the configuration detail from the developer. How GRAILS works? Like any other MVC based framework, GRAILS also has three components to handle the overall working --Domain Classes (Model), GSP (Groovy Server Pages) or JSP (Java Server Pages) (View) and Action Controller (Controller) Frontend is designed and developed with gsp/jsp integrated with HTML and CSS files. Any user will make use of only this part. The request is generated by the user here only. Afterwards, the action controller takes over the control. Controller bundles and routes HTTP request to other objects in framework. Where they get to meet with the business entities and other domain classes in order to satisfy the request generated by the user. After that, the result is outputted with the help Process diagram shows how a user interacts with the system of gsp/jsp. and how his request is processed & output is displayed. 84 PCQUEST NOVEMBER 2012 A CYBERMEDIA Publication www.pcquest.com GRAILS vs Other J2EE Frameworks and users from a database. Of course there is a lot more You could find GRAILS extremely easy to use in comparison that you can add to this application, but for the sake of with other Java frameworks like Struts. Grails has three simplicity, we’ll stick to this one. The database we’re using properties which attempt to increase productivity when is created on MySQL and is named ‘Inventory_Table’. First compared to traditional Java web frameworks -No XML create classes for each of the database entities. This is configuration, Ready-to-use development environment, done using the following command from the root directory Functionality available through mixins and Reduce the of your product. need for configuration files and other boilerplate code. Apart from these properties there are several other grails create-domain-class items features such as Language constructs, List & Map support, XML & Swing capabilities which are rarely found at a single The next step in building your domain model is to link framework. One of the major advantages of using GRAILS these classes so you can handle relationships between over other j2ee frameworks is that it can easily work on them. You do this by telling GORM that which type of re- any j2ee container. All you have to do is to just deploy the lationship exists between the database entities. After that war file in any j2ee container and tweak web.xml. you will add the functionality and validation rules to the different domain classes. GORM (Groovy Object class items { Relational Mapping) static hasMany = [location:location, category:category] Domain classes are objects that need to be mapped to the int items_id database. That’s where GORM comes into effect. The basis String version of GORM is formulated by another very popular framework Date lastUpdated i.e. Hibernate. It would be helpful in linking Domain Boolean recorded= false classes using relationship. GORM provides very powerful SortedSet comments dynamic methods for CRUD (Create/Read/Update/Delete) static constraints = { operations. Moreover, an HSQL database comes built-in title(nullable:false, blank:false, length:1..50) with GRAILS. version (length:0..100) lastUpdated(nullable:true) Let’s Start Building Apps recorded(nullable:false) You can find install instructions on the framework’s } website. Just install it and set the Groovy_Home and Java_ } Home environment variable. Also, add Groovy_Home/bin The next step is to expose your domain objects to users to your path. After configuring the GRAILS with any IDE through some controllers and views. This will allow you to like Netbeans or Eclipse, you are ready for the application manipulate your domain objects through a user interface. development. First go to the development workspace and One important thing is that, you don’t have to use getters run the following in the command prompt: grails create-app Enterprise Inventory This will create a folder called Enterprise Inventory and a grails-app directory under that, which contains the sub-directories named as Configuration, Control- lers, Domain classes, Serv- ices, Tag Libraries, Utility and Views. The application simply Code snippet and Sub-directory structure of the application development configured on displays products, location Netbeans IDE. www.pcquest.com A CYBERMEDIA Publication NOVEMBER 2012 PCQUEST 85 { Developer { Different stages of inventory application, login page at top left, data entry page at the bottom and report generation page at the right and setters of Java Bean classes like we use to do in other j2ee framework like Struts.To create the controllers for your domain, go back to the command line and run the follow- ing commands: grails create-controller items Once you are through with your classes, you can con- figure the application to use the MySQL database. As mentioned earlier, the whole working revolves around the MVC architecture and the user will interact through the gsp/jsp page. 86 PCQUEST NOVEMBER 2012 A CYBERMEDIA Publication www.pcquest.com .
Recommended publications
  • Technical Project and Product Manager Solution Architect and Senior Full Stack Developer
    Technical project and product manager Solution architect and senior full stack developer Profile Technical project and product manager, working with R&D software innovation processes, with a background as solution architect and senior full stack developer. Experienced manager of outsourced teams in many different countries, working with team efficiency based on pragmatic Scrum approach. Experience from scaled agile projects with hundreds of people involved. I am used to working with confidential information and have been security cleared several times. Knowledge I have been programming more than 20 different programming, script and database languages the last 36 years. My recent programming skills include NodeJS, JavaScript, Python, C#, Java, React for progressive web apps (PWA) and some courses in React-Native Expo. I have worked mostly with REST API architecture and a little GraphQL. I have specialist knowledge from leading CMS and DMS systems like Sitecore, DOCUMENTUM and Public 360, were I as product manager had to know Danish law on personal data and record management (ESDH). I worked many years on products for the educational sector and non-profit projects like Oligo Academy, that uses virtual worlds in primary schools for teaching environmental issues and other study subjects. Nikolaj Lisberg Hansen Born 1973 and started programming early in 1984. Got first programming job in 1995 and started working as freelance solution architect and technical project manager in 2006. I practice Tai Chi, love music and like to travel the world. Languages Very good Danish, English and German. Availability 10-25 hours per week normally remote or on-site near Copenhagen. Flexible salary between 96€ / hour (600 DKK) for remote work and 144€ / hour (900 DKK) for on-site work on product innovation or as technical project manager, solution architect or senior developer.
    [Show full text]
  • Cloud Computing Synopsis and Recommendations
    Special Publication 800-146 Cloud Computing Synopsis and Recommendations Recommendations of the National Institute of Standards and Technology Lee Badger Tim Grance Robert Patt-Corner Jeff Voas NIST Special Publication 800-146 Cloud Computing Synopsis and Recommendations Recommendations of the National Institute of Standards and Technology Lee Badger Tim Grance Robert Patt-Corner Jeff Voas C O M P U T E R S E C U R I T Y Computer Security Division Information Technology Laboratory National Institute of Standards and Technology Gaithersburg, MD 20899-8930 May 2012 U.S. Department of Commerce John Bryson, Secretary National Institute of Standards and Technology Patrick D. Gallagher, Under Secretary of Commerce for Standards and Technology and Director CLOUD COMPUTING SYNOPSIS AND RECOMMENDATIONS Reports on Computer Systems Technology The Information Technology Laboratory (ITL) at the National Institute of Standards and Technology (NIST) promotes the U.S. economy and public welfare by providing technical leadership for the nation’s measurement and standards infrastructure. ITL develops tests, test methods, reference data, proof of concept implementations, and technical analysis to advance the development and productive use of information technology. ITL’s responsibilities include the development of management, administrative, technical, and physical standards and guidelines for the cost-effective security and privacy of other than national security-related information in Federal information systems. This Special Publication 800-series reports on ITL’s research, guidance, and outreach efforts in computer security and its collaborative activities with industry, government, and academic organizations. National Institute of Standards and Technology Special Publication 800-146 Natl. Inst. Stand. Technol. Spec. Publ.
    [Show full text]
  • Comparative Studies of 10 Programming Languages Within 10 Diverse Criteria
    Department of Computer Science and Software Engineering Comparative Studies of 10 Programming Languages within 10 Diverse Criteria Jiang Li Sleiman Rabah Concordia University Concordia University Montreal, Quebec, Concordia Montreal, Quebec, Concordia [email protected] [email protected] Mingzhi Liu Yuanwei Lai Concordia University Concordia University Montreal, Quebec, Concordia Montreal, Quebec, Concordia [email protected] [email protected] COMP 6411 - A Comparative studies of programming languages 1/139 Sleiman Rabah, Jiang Li, Mingzhi Liu, Yuanwei Lai This page was intentionally left blank COMP 6411 - A Comparative studies of programming languages 2/139 Sleiman Rabah, Jiang Li, Mingzhi Liu, Yuanwei Lai Abstract There are many programming languages in the world today.Each language has their advantage and disavantage. In this paper, we will discuss ten programming languages: C++, C#, Java, Groovy, JavaScript, PHP, Schalar, Scheme, Haskell and AspectJ. We summarize and compare these ten languages on ten different criterion. For example, Default more secure programming practices, Web applications development, OO-based abstraction and etc. At the end, we will give our conclusion that which languages are suitable and which are not for using in some cases. We will also provide evidence and our analysis on why some language are better than other or have advantages over the other on some criterion. 1 Introduction Since there are hundreds of programming languages existing nowadays, it is impossible and inefficient
    [Show full text]
  • Nikolaj Lisberg Hansen Availability: Only for Minor Ongoing Tasks Or Ad Address: Valdemarsgade 41, St
    Personal profile Entrepreneur and Product Manager Experienced Technical project manager Solution architect and senior developer Entrepreneur and Product Manager with experience as technical project manager, solution architect and senior developer. Good knowledge of product development processes in R&D and public-sector domain knowledge for legal requirements in record and document management. Team efficiency based on a pragmatic approach to using SCRUM methods. Keep IT simple is a primary goal for me in all my work. My primary programming skills include NodeJS, C#, Java, PHP, AngularJS, JavaScript and CSS, but I have been programming more than 18 different programming, script and database languages the last 33 years. I have specialist domain knowledge from market leading CMS and DMS systems like Sitecore and Documentum. I know the Danish laws about personal data and record management (ESDH), from working as product manager in Software Innovation. Currently I am working on a non-profit project called Oligo Academy to use virtual worlds in primary and secondary schools as the basis for international school projects. I worked many years with confidential information and have been security cleared by both Danish Police Intelligence Service and the Danish Defense Intelligence Service several times. Personal information: Born 1973 and started programming early in 1984. Got first programming job in 1995 and started working as freelance solution architect and technical project manager in 2006. Practices the martial art Tai Chi Chuan, loves Jazz music and spending time with my family. Languages: Very good Danish, English and German. Contact information Name: Nikolaj Lisberg Hansen Availability: Only for minor ongoing tasks or ad Address: hoc assistance with solution Valdemarsgade 41, st.
    [Show full text]
  • Collaborative Modelling and Co-Simulation in Engineering and Computing Curricula
    Collaborative Modelling and Co-simulation in Engineering and Computing Curricula Peter Gorm Larsen1, Hugo Daniel Macedo1, Claudio Goncalves Gomes1, Lukas Esterle1, Casper Thule1, John Fitzgerald2, and Kenneth Pierce2 1 DIGIT, Department of Engineering, Aarhus University, Aarhus, Denmark, [email protected] [email protected], [email protected], [email protected] 2 School of Computing, Newcastle University, United Kingdom, [email protected] [email protected] Abstract. The successful development of Cyber-Physical Systems (CPSs) re- quires collaborative working across diverse engineering disciplines, notations and tools. However, classical computing curricula rarely provide opportunities for students to look beyond the confines of one set of methods. In this paper, we report approaches to raising students’ awareness of the integrative role of digital technology in future systems development. Building on research in open but in- tegrated tool chains for CPS engineering, we consider how this has been realised in two degree programmes in Denmark and the UK, and give preliminary find- ings. These include the need for ensuring stability of research-quality tools, and observations on how this material is presented in Computing versus Engineering curricula. 1 Introduction Collaboration between diverse disciplines is essential to the successful development of the Cyber-Physical Systems (CPSs) that are key to future innovations [26]. However, many university curricula train professionals within long-established disciplinary silos such as mechanical, electrical, civil or software engineering, with few opportunities for interaction between them. It is therefore critical to include elements within degree programmes to prepare students for the cross-disciplinary work that will likely feature in their subsequent careers [18].
    [Show full text]
  • The TXM Platform: Building Open-Source Textual Analysis Software Compatible with the TEI Encoding Scheme*
    PACLIC 24 Proceedings 389 The TXM Platform: Building Open-Source Textual Analysis Software Compatible with the TEI Encoding Scheme* Serge Heiden ICAR Laboratory, University of Lyon, 15 parvis René Descartes - ENS de Lyon, 69342 Lyon, France [email protected] Abstract. This paper describes the rationale and design of an XML-TEI encoded corpora compatible analysis platform for text mining called TXM. The design of this platform is based on a synthesis of the best available algorithms in existing textometry software. It also relies on identifying the most relevant open-source technologies for processing textual resources encoded in XML and Unicode, for efficient full-text search on annotated corpora and for statistical data analysis. The architecture is based on a Java toolbox articulating a full-text search engine component with a statistical computing environment and with an original import environment able to process a large variety of data sources, including XML-TEI, and to apply embedded NLP tools to them. The platform is distributed as an open-source Eclipse project for developers and in the form of two demonstrator applications for end users: a standard application to install on a workstation and an online web application framework. Keywords: xml-tei corpora, search engine, statistical analysis, textometry, open-source. 1 Introduction Textometry is a textual data analysis methodology born in France in the 80s in relation with the data analysis framework designed by (Benzecri et al., 1973a,b). A first synthesis of the methodology can be found in (Lebart et al, 1997). It somewhat differentiates from text mining by the fact that it tries to always combine various statistical analysis techniques, like factorial correspondence analysis or hierarchical ascendant classification, with full-text search techniques like kwic concordances to be able to always get back to the precise original editorial context of any textual event participating to the analysis.
    [Show full text]
  • Pipenightdreams Osgcal-Doc Mumudvb Mpg123-Alsa Tbb
    pipenightdreams osgcal-doc mumudvb mpg123-alsa tbb-examples libgammu4-dbg gcc-4.1-doc snort-rules-default davical cutmp3 libevolution5.0-cil aspell-am python-gobject-doc openoffice.org-l10n-mn libc6-xen xserver-xorg trophy-data t38modem pioneers-console libnb-platform10-java libgtkglext1-ruby libboost-wave1.39-dev drgenius bfbtester libchromexvmcpro1 isdnutils-xtools ubuntuone-client openoffice.org2-math openoffice.org-l10n-lt lsb-cxx-ia32 kdeartwork-emoticons-kde4 wmpuzzle trafshow python-plplot lx-gdb link-monitor-applet libscm-dev liblog-agent-logger-perl libccrtp-doc libclass-throwable-perl kde-i18n-csb jack-jconv hamradio-menus coinor-libvol-doc msx-emulator bitbake nabi language-pack-gnome-zh libpaperg popularity-contest xracer-tools xfont-nexus opendrim-lmp-baseserver libvorbisfile-ruby liblinebreak-doc libgfcui-2.0-0c2a-dbg libblacs-mpi-dev dict-freedict-spa-eng blender-ogrexml aspell-da x11-apps openoffice.org-l10n-lv openoffice.org-l10n-nl pnmtopng libodbcinstq1 libhsqldb-java-doc libmono-addins-gui0.2-cil sg3-utils linux-backports-modules-alsa-2.6.31-19-generic yorick-yeti-gsl python-pymssql plasma-widget-cpuload mcpp gpsim-lcd cl-csv libhtml-clean-perl asterisk-dbg apt-dater-dbg libgnome-mag1-dev language-pack-gnome-yo python-crypto svn-autoreleasedeb sugar-terminal-activity mii-diag maria-doc libplexus-component-api-java-doc libhugs-hgl-bundled libchipcard-libgwenhywfar47-plugins libghc6-random-dev freefem3d ezmlm cakephp-scripts aspell-ar ara-byte not+sparc openoffice.org-l10n-nn linux-backports-modules-karmic-generic-pae
    [Show full text]
  • School of Computing
    SCHOOL OF COMPUTING The 15th Overture Workshop: New Capabilities and Applications for Model-based Systems Engineering J. S. Fitzgerald, P. W. V. Tran-Jørgensen, and T. Oda (Editors) TECHNICAL REPORT SERIES No. CS-TR- 1513-2017 TECHNICAL REPORT SERIES No. CS-TR- 1513 October, 2017 The 15th Overture Workshop: New Capabilities and Applications for Model-based Systems Engineering J. S. Fitzgerald, P. W. V. Tran-Jørgensen, and T. Oda Abstract The 15th in the “Overture" series”of workshops on the Vienna Development Method (VDM), its associated tools and applications, was held at Newcastle University, UK, on 15th September, 2017. The workshop provided a forum for discussing and advancing the state of the art in formal modelling and analysis using VDM and its family of associated formalisms including extensions for describing distributed, real-time and cyber-physical systems. The workshop reflected the breadth and depth of work supporting and applying VDM. Contributions covered topics as diverse as architectural frameworks of autonomous Cyber-Physical Systems, tool building techniques such as interpreter design, automated code generation, testing and debugging and case studies of formal modelling and tool migration. Keywords: model-based engineering, formal methods, VDM © 2017 Newcastle University. Printed and published by Newcastle University, School of Computing, Urban Sciences Building, Newcastle upon Tyne, NE4 5TG, England. Bibliographical details Title and Authors NEWCASTLE UNIVERSITY School of Computing. Technical Report Series. CS-TR- 1513 Abstract: The 15th in the “Overture" series” of workshops on the Vienna Development Method (VDM), its associated tools and applications, was held at Newcastle University, UK, on 15th September, 2017. The workshop provided a forum for discussing and advancing the state of the art in formal modelling and analysis using VDM and its family of associated formalisms including extensions for describing distributed, real-time and cyber-physical systems.
    [Show full text]
  • Using the Gnustep Appkit a Guide to Using Various Parts of the Gnustep Appkit for Application Development
    Using the GNUstep AppKit A guide to using various parts of the GNUstep AppKit for application development Christopher Armstrong c 2005-2006 Christopher Armstrong. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2, as published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is provided on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND USEFULNESS OF THE DOC- UMENTATION IS WITH YOU (THE LICENSEE). IN NO EVENT WILL THE COPYRIGHT HOLDERS BE LIABLE FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPE- CIAL, GENERAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENTATION (INCLUDING BUT NOT LIMITED TO LOSS OF DATA, USE, OR PROFITS; PROCUREMENT OF SUBSTITUTE GOODS AND SERVICES; OR BUSINESS INTERUPTION) HOWEVER CAUSED, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Table of Contents 1 Introduction ........................................... 1 1.1 Overview ..................................................................... 1 1.2 Implementation Details ........................................................ 1 1.2.1 Drag and Drop ..........................................................
    [Show full text]
  • 1 Gnustep Frequently Asked Questions with Answers
    1 GNUstep Frequently Asked Questions with Answers Last updated 1 January 2008. Please send corrections to [email protected]. Also look at the user FAQ for more user oriented questions. 1.1 Compatibility 1.1.1 Is it easy to port OPENSTEP programs to GNUstep? It is probably easy for simple programs. There are some portability tools to make this easier, or rewrite the Makefiles yourself. You will also have to translate the NIB files (if there are any) to GNUstep model files using the nib2gmodel program (from ftp://ftp.gnustep.org/pub/gnustep/dev-apps). 1.1.2 How about porting between Cocoa and GNUstep? It’s easier from GNUstep to Cocoa than Cocoa to GNUstep. Cocoa is constantly changing, much faster than GNUstep could hope to keep up. They have added extensions and new classes that aren’t available in GNUstep yet. Plus there are some other issues. If you start with Cocoa: • Use #ifndef GNUSTEP for Apple only code. • Do not use CoreFoundation • Do not use Objective-C++ (except with gcc 4.1 or later) • Do not use Quicktime or other proprietary extension • GNUstep should be able to read Cocoa nib files automatically, so there is no need to port these, although you might want to have GNUstep specific versions of them anyway. See also http://mediawiki.gnustep.org/index.php/Writing_portable_code for more information. 1.1.3 Tools for porting While the programming interface should be almost transparent between systems (expect for the unimplemented parts, of course), there are a variety of other files and tools that are necessary for porting programs.
    [Show full text]
  • The Cross-Platform Developing Skills for Mac Applications
    The Cross-Platform Developing Skills for Mac Applications Xiao Hanyu1 October 17, 2009 1Computer Science and Technology 0706, Zhejiang University Contents 1 Basics of Mac Platform 3 1.1 Mac OS and iPhone .............................. 3 1.1.1 Introduction to Mac OS ....................... 3 1.1.2 Introduction to iPhone OS ...................... 3 1.1.3 iPhone and iPod Touch ........................ 6 1.2 Before Developing .............................. 6 1.2.1 Darwin (operating system) ..................... 6 1.2.2 Cocoa API ................................ 7 1.2.3 POSIX .................................. 7 1.3 Developing Tools ............................... 7 1.3.1 Xcode .................................. 7 1.3.2 Interface Builder ........................... 8 1.4 Objective-C ................................... 8 1.4.1 Introduction to Objective-C ..................... 8 1.4.2 A Short History of Objective-C ................... 9 1.4.3 Syntax Overview ........................... 10 2 The Cross-Platform Solution 11 2.1 Cygwin ..................................... 11 2.2 Cross-compiling ................................ 11 2.3 Makefile .................................... 13 2.4 GNUstep .................................... 15 2.4.1 Introduction to GNUstep ...................... 15 2.4.2 The Correlative OpenStep ...................... 16 1 CONTENTS CONTENTS 2.4.3 Gorm .................................. 16 2.4.4 ProjectCenter ............................. 17 2.4.5 Window Maker ............................. 17 3 Our First "Hello World" Application
    [Show full text]
  • Gorm and Projectcenter, the Gnustep RAD Tools at the Beginning
    LinuxFocus article number 265 http://linuxfocus.org Gorm and ProjectCenter, the GNUstep RAD tools by Georges Tarbouriech Abstract: <georges.t(at)linuxfocus.org> RAD stands for Rapid Application Development. At the end of the 80's, About the author: when NeXTstep was released, it came with an incredible tool, called InterfaceBuilder. Used in conjunction with another tool, named Georges is a long time Unix ProjectBuilder, it allowed to build graphical applications in a flash. user. He loves GNUstep GNUstep offers a free version of these tools, called Gorm.app and and the tools this great ProjectCenter.app. framework provides. _________________ _________________ _________________ At the beginning... From the computers prehistory, software development has been a great challenge. Computers were quite big in size despite their very little power. They were quite expensive, not really numerous and developers were unable to use them as often as they wished since they had to share them with other people. Then, researchers tried to find a way to make computers execute more than one task at a time to improve efficiency. Obviously, they had to design and create programming languages from scratch, taking into account the poor resources of the available machines. Thus, during the 60's various new programming languages appeared: LISP, FORTRAN, BASIC, Algol68, BCPL, etc. Next came the B language derived from the above mentioned BCPL, which soon became the C language. This last changed the world of programming. The Object Oriented (SmallTalk, Objective C, C++, etc) languages appeared later, with the "graphical era". In the 80's some machines were providing graphical OSes (Apple Macintosh, Commodore Amiga, Atari ST, etc) and the X Window System was in the works.
    [Show full text]