The Grails Framework - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 3.1.10

Total Page:16

File Type:pdf, Size:1020Kb

The Grails Framework - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 3.1.10 See the light - agile, industrial strength, rapid web application development made easy The Grails Framework - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 3.1.10 Table of Contents 1 Introduction 1.1 What's new in Grails 3.1? 1.1.1 Improvements to Grails 3 Profiles 1.1.2 REST API and AngularJS Profiles 1.1.3 GORM 5 Suite 1.1.4 Plugin Publishing Plugins 1.2 What's new in Grails 3.0? 1.2.1 Core Features 1.2.2 Web Features 1.2.3 Development Environment Features 1.2.4 Testing Features 2 Getting Started 2.1 Installation Requirements 2.2 Downloading and Installing 2.3 Creating an Application 2.4 A Hello World Example 2.5 Using Interactive Mode 2.6 Getting Set Up in an IDE 2.7 Convention over Configuration 2.8 Running and Debugging an Application 2.9 Testing an Application 2.10 Deploying an Application 2.11 Supported Java EE Containers 2.12 Creating Artefacts 2.13 Generating an Application 3 Upgrading from previous versions of Grails 1 3.1 Upgrading from Grails 3.0 3.2 Upgrading from Grails 2.x 3.2.1 Upgrading Plugins 3.2.2 Upgrading Applications 4 Configuration 4.1 Basic Configuration 4.1.1 Options for the yml format Config 4.1.2 Built in options 4.1.3 Logging 4.1.4 GORM 4.2 The Application Class 4.2.1 Executing the Application Class 4.2.2 Customizing the Application Class 4.2.3 The Application LifeCycle 4.3 Environments 4.4 The DataSource 4.4.1 DataSources and Environments 4.4.2 Automatic Database Migration 4.4.3 Transaction-aware DataSource Proxy 4.4.4 Database Console 4.4.5 Multiple Datasources 4.5 Versioning 4.6 Project Documentation 4.7 Dependency Resolution 5 The Command Line 5.1 Interactive Mode 5.2 Creating Custom Scripts 5.3 Re-using Grails scripts 5.4 Building with Gradle 5.4.1 Defining Dependencies with Gradle 5.4.2 Working with Gradle Tasks 5.4.3 Grails plugins for Gradle 6 Application Profiles 6.1 Creating Profiles 6.2 Profile Inheritance 6.3 Publishing Profiles 6.4 Understanding Profiles 2 6.5 Creating Profile Commands 6.6 Creating Profile Features 7 Object Relational Mapping (GORM) 7.1 Quick Start Guide 7.1.1 Basic CRUD 7.2 Domain Modelling in GORM 7.2.1 Association in GORM 7.2.1.1 Many-to-one and one-to-one 7.2.1.2 One-to-many 7.2.1.3 Many-to-many 7.2.1.4 Basic Collection Types 7.2.2 Composition in GORM 7.2.3 Inheritance in GORM 7.2.4 Sets, Lists and Maps 7.3 Persistence Basics 7.3.1 Saving and Updating 7.3.2 Deleting Objects 7.3.3 Understanding Cascading Updates and Deletes 7.3.4 Eager and Lazy Fetching 7.3.5 Pessimistic and Optimistic Locking 7.3.6 Modification Checking 7.4 Querying with GORM 7.4.1 Dynamic Finders 7.4.2 Where Queries 7.4.3 Criteria 7.4.4 Detached Criteria 7.4.5 Hibernate Query Language (HQL) 7.5 Advanced GORM Features 7.5.1 Events and Auto Timestamping 7.5.2 Custom ORM Mapping 7.5.2.1 Table and Column Names 7.5.2.2 Caching Strategy 7.5.2.3 Inheritance Strategies 7.5.2.4 Custom Database Identity 7.5.2.5 Composite Primary Keys 7.5.2.6 Database Indices 7.5.2.7 Optimistic Locking and Versioning 3 7.5.2.8 Eager and Lazy Fetching 7.5.2.9 Custom Cascade Behaviour 7.5.2.10 Custom Hibernate Types 7.5.2.11 Derived Properties 7.5.2.12 Custom Naming Strategy 7.5.3 Default Sort Order 7.6 Programmatic Transactions 7.7 GORM and Constraints 8 The Web Layer 8.1 Controllers 8.1.1 Understanding Controllers and Actions 8.1.2 Controllers and Scopes 8.1.3 Models and Views 8.1.4 Redirects and Chaining 8.1.5 Data Binding 8.1.6 XML and JSON Responses 8.1.7 More on JSONBuilder 8.1.8 Uploading Files 8.1.9 Command Objects 8.1.10 Handling Duplicate Form Submissions 8.1.11 Simple Type Converters 8.1.12 Declarative Controller Exception Handling 8.2 Groovy Server Pages 8.2.1 GSP Basics 8.2.1.1 Variables and Scopes 8.2.1.2 Logic and Iteration 8.2.1.3 Page Directives 8.2.1.4 Expressions 8.2.2 GSP Tags 8.2.2.1 Variables and Scopes 8.2.2.2 Logic and Iteration 8.2.2.3 Search and Filtering 8.2.2.4 Links and Resources 8.2.2.5 Forms and Fields 8.2.2.6 Tags as Method Calls 8.2.3 Views and Templates 8.2.4 Layouts with Sitemesh 4 8.2.5 Static Resources 8.2.6 Sitemesh Content Blocks 8.2.7 Making Changes to a Deployed Application 8.2.8 GSP Debugging 8.3 Tag Libraries 8.3.1 Variables and Scopes 8.3.2 Simple Tags 8.3.3 Logical Tags 8.3.4 Iterative Tags 8.3.5 Tag Namespaces 8.3.6 Using JSP Tag Libraries 8.3.7 Tag return value 8.4 URL Mappings 8.4.1 Mapping to Controllers and Actions 8.4.2 Mapping to REST resources 8.4.3 Redirects In URL Mappings 8.4.4 Embedded Variables 8.4.5 Mapping to Views 8.4.6 Mapping to Response Codes 8.4.7 Mapping to HTTP methods 8.4.8 Mapping Wildcards 8.4.9 Automatic Link Re-Writing 8.4.10 Applying Constraints 8.4.11 Named URL Mappings 8.4.12 Customizing URL Formats 8.4.13 Namespaced Controllers 8.5 Interceptors 8.5.1 Defining Interceptors 8.5.2 Matching Requests with Inteceptors 8.5.3 Ordering Interceptor Execution 8.6 Content Negotiation 9 Traits 9.1 Traits Provided by Grails 9.1.1 WebAttributes Trait Example 10 Web Services 10.1 REST 10.1.1 Domain classes as REST resources 5 10.1.2 Mapping to REST resources 10.1.3 Linking to REST resources from GSP pages 10.1.4 Versioning REST resources 10.1.5 Implementing REST controllers 10.1.5.1 Extending the RestfulController super class 10.1.5.2 Implementing REST Controllers Step by Step 10.1.5.3 Generating a REST controller using scaffolding 10.1.6 The REST Profile 10.1.7 The Angular Profile 10.1.8 JSON Views 10.1.8.1 Getting Started 10.1.8.2 Creating JSON Views 10.1.8.3 JSON View Templates 10.1.8.4 Rendering Domain Classes with JSON Views 10.1.8.5 JSON Views by Convention 10.1.9 Customizing Response Rendering 10.1.9.1 Customizing the Default Renderers 10.1.9.2 Implementing a Custom Renderer 10.1.9.3 Using GSP to Customize Rendering 10.1.10 Hypermedia as the Engine of Application State 10.1.10.1 HAL Support 10.1.10.2 Atom Support 10.1.10.3 Vnd.Error Support 10.1.11 Customizing Binding of Resources 10.2 RSS and Atom 11 Asynchronous Programming 11.1 Promises 11.2 Events 11.2.1 Consuming Events 11.2.2 Event Notification 11.2.3 Reactor Spring Annotations 11.2.4 Events from GORM 11.2.5 Events from Spring 11.3 Asynchronous GORM 11.4 Asynchronous Request Handling 11.5 Servlet 3.0 Async 12 Validation 6 12.1 Declaring Constraints 12.2 Validating Constraints 12.3 Sharing Constraints Between Classes 12.4 Validation on the Client 12.5 Validation and Internationalization 12.6 Applying Validation to Other Classes 13 The Service Layer 13.1 Declarative Transactions 13.1.1 Transactions Rollback and the Session 13.2 Scoped Services 13.3 Dependency Injection and Services 14 Static Type Checking And Compilation 14.1 The GrailsCompileStatic Annotation 14.2 The GrailsTypeChecked Annotation 15 Testing 15.1 Unit Testing 15.1.1 Unit Testing Controllers 15.1.2 Unit Testing Tag Libraries 15.1.3 Unit Testing Domains 15.1.4 Unit Testing Filters 15.1.5 Unit Testing URL Mappings 15.1.6 Mocking Collaborators 15.1.7 Mocking Codecs 15.1.8 Unit Test Metaprogramming 15.2 Integration Testing 15.3 Functional Testing 16 Internationalization 16.1 Understanding Message Bundles 16.2 Changing Locales 16.3 Reading Messages 16.4 Scaffolding and i18n 17 Security 17.1 Securing Against Attacks 17.2 Cross Site Scripting (XSS) Prevention 17.3 Encoding and Decoding Objects 17.4 Authentication 17.5 Security Plugins 7 17.5.1 Spring Security 17.5.2 Shiro 18 Plugins 18.1 Creating and Installing Plugins 18.2 Plugin Repositories 18.3 Providing Basic Artefacts 18.4 Evaluating Conventions 18.5 Hooking into Runtime Configuration 18.6 Adding Methods at Compile Time 18.7 Adding Dynamic Methods at Runtime 18.8 Participating in Auto Reload Events 18.9 Understanding Plugin Load Order 18.10 The Artefact API 18.10.1 Asking About Available Artefacts 18.10.2 Adding Your Own Artefact Types 19 Grails and Spring 19.1 The Underpinnings of Grails 19.2 Configuring Additional Beans 19.3 Runtime Spring with the Beans DSL 19.4 The BeanBuilder DSL Explained 19.5 Property Placeholder Configuration 19.6 Property Override Configuration 20 Grails and Hibernate 20.1 Using Hibernate XML Mapping Files 20.2 Mapping with Hibernate Annotations 20.3 Adding Constraints 21 Scaffolding 22 Deployment 22.1 Standalone 22.2 Container Deployment (e.g.
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]