Giter VIP home page Giter VIP logo

appverse-web's People

Contributors

carloslozano avatar carlosrubio avatar ernestroca avatar iromu avatar magalimasferrer avatar miguelfgar avatar mrestivill avatar rbofarull avatar sergiorc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appverse-web's Issues

Error in namedQueries execution

We have in JPAPersistenceService

@Override
public List<T> retrieveList(final String queryName, final Object... values)
        throws Exception {...}

And

@Override
public List<T> retrieveList(final String queryString) throws Exception {...}

When tried to execute a namedQuery without parameters it executes the queryString query.

It should be a good idea set a different name the retrieve methods with NamedQueries to avoid overlays.

Authentication should be implementation agnostic

I have detected several points where authentication and user management is dependant from implementation:

Basically, every class where "org.springframework.security.core.userdetails.User" is being used is tied to implementation.
Authentication providers that return other "org.springframework.security.core.userdetails.UserDetails" implementations will fail.
(I have tested with org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider)

Class "org.springframework.security.core.userdetails.User" in being used in:

AK47AuhtenticationUserDetailsService
PreAuthUserDetailsService
AuthenticationServiceFacadeImpl
EntityListener
GWTAuthenticationServiceFacadeImpl

Code field in framework exceptions

I need to set in my IntegrationException and BusinessException three parameters:

  • message
  • source exception (sometimes)
  • code

I'm using a constructor which has message and exception as parameters, but I can't set the code. Could you add a constructor which include the three parameters or only message+code?

Timezone dates issue support

Working with Date objects in GWT is difficult due to the chance of using distict timezones in Server and Client. Actually, almost ever, we want to show date or time exactly as it was created in server, not in other timezone.

This is very documented issue (although info is sometimes confuse and/or wrong):

http://stackoverflow.com/questions/1686448/client-side-time-zone-support-in-gwt
http://www.sencha.com/forum/showthread.php?123022-Date-change-on-client-side-TimeZone

I think appverse could provide support for this issue, or at least, define work guidelines.

Maven 3rd party repositories and artifacts

Project uses artifacts not in Maven2 repository, likely defined in the Maven2 global settings.xml or though Nexus manager or manually installed in local maven repository.
The are:
EclipseLink,
Adobe flex and Cairngorm, oracle driver,
etc.

I recommend exposing list of defined Maven repositories and a zip + install script to install individual jar files in local maven repo if not repo exists.

GWT Archetype: Default persistence XML has duplicated entries

Default (example) EclipseLink setup has duplicated entries. Please check:

        <property name="eclipselink.jdbc.batch-writing.size" value="1000" />
        <property name="eclipselink.jdbc.fetch-size" value="5000"/>
        <property name="eclipselink.jdbc.batch-writing.size" value="1000" />
        <property name="eclipselink.jdbc.fetch-size" value="5000"/>

Controller exception handler

We have detected GWTRpcController hides all data of propagated exception but the message.

This behavior causes that it's impossible to perform a proper management of exceptions in the frontend (Neither code nor exception type is serialized)

We are using Appverse-web 1.0.3

JPAPersistenceService: Allow case insensitive ordering in automatically JPA generated querys order by

Currently JPAPersistenceService automatically generates JPA querys by means a wide range of methods in its API.
A very common scenario is to have a grid-like UI component in your front end showing a list of results, with remote pagination and remote sorting when the user clicks on a column.
At the moment JPAPersistenceService is great for this as its API allows you to pass a DataFilter holding all this information as a parameter and JPAPersistenceService is automatically building the JPQL query and executing it providing the results to the caller.
JPAPersistenceService allows to add condicions that they are case insensitive in the WHERE clause, however, JPAPersistenceService does NOT allow to specify that SORT clause has to be case insensitive (for string sort columns / fields).

This would cause automatically generated JPQL to order the following results not in the spected order (if we are ordering for this 'text' column):

Name

John
Peter
john2
peter2

This functionalitiy would be great in order to avoid having to write a custom query for this as the scenario of having to order a grid-like component by a text column is quite common. This is a very nice to have.

Issues detected in 1.0.4-SNAPSHOT

  1. For GWT front ends the static resources are not unpacked inside WAR (easy to test with GWT Showcase)
  2. HSQLDB is included with Maven scope "test". This is a problem as it can be used during development as well as makes the development environment lighter.
  3. Appverse Web WS module has "mail" with maven scope "provided". This is a problem as Tomcat hasn't got this library in /lib folder by default. In development environments without further setup this will not work. We can see how to change the Maven setup so that for development is included but for production-like environments this is not included (provided by the container).

module POM does not list required dependency

several classes in Module: appverse-web-modules-backend-core-persistence

import org.eclipse.persistence.*

POM needs:

org.ow2.easybeans
easybeans-uberjar-eclipselink
1.1.0-M2

to satisfy these requirments

Framework Maven Inherance

Currently Projects using Appverse Web Framework have to inherits from Framework POM, This cause issues as inherit sonatype nexus OSS configuration or difficult the change of libraries at project level.

Eliminate this coupling letting at project level the minimum complexity as possible

Compilation of ELJMSTransportManager fails, syntax issue

modules/backend/core/persistence/src/main/java/org/appverse/web/framework/backend/persistence/services/integration/ELJMSTransportManager.java

ln 116: reuseJMSTopicPublisher);

reuseJMSTopicPublisher cannot be resolved to a variable

GWT archetype and showcase improvements

The following features already implemented in JSF2 archetype and showcase can be applied to GWT archetype and showcase:

  1. Add native2ascii Maven plugin to encode property files corresponding to messages to ensure avoiding encoding problems
  2. Add maven Jetty plugin setup (like in JSF2 archetype and showcase) so that users can run the GWT showcase and generated projects from archetype in an Embedded Jetty in production mode. Please, take into account that this would be an Embedded Jetty out-of-the box to quickly run the application. It is different that embedded jetty setup provided with GWT SDK Eclipse plugin to run and debug the application in Development Mode.

Add automatic class reloading setup to maven jetty plugin (for development) in Maven archetypes

We need to add some setup to archetypes so that the generated projects have the proper setup in order to reload classes (quite useful for development). This will be great for GWT projects as classes in backend will be automatically reloaded. The same will apply for JSF2 archetypes and projects with other front-end technologies.

In order to do so, please add:

  • To Maven compiler setup :

    target/${artifactId}-${version}/WEB-INF/classes/

(We want Maven and the used IDE to compile to the same location)

  • To Eclipse Launch configuration (for Eclipse IDE):

-Djetty.reload=automatic -Djetty.refreshInterval=1

So that Jetty looks for changes every second (this make reloading immediate). I have tried it out and such a tiny refresh interval it is not a problem

GWT "Perfect caching" issues

Hi all
We have detected some issues in GWT caching mechanism.
One of them, is related with basic configuration in Web Server (apache):

This configuration is very documented, and repeated in a lot of threads:

http://stackoverflow.com/questions/3147650/want-to-load-cache-html-file-of-gwt-application-on-client-side

The problem is that configuration didn't work for us. "no-cache.js" files keep being cached.
The settings that solved our problem were:

<LocationMatch (.*)\.cache\.js$>
  ExpiresActive on
  ExpiresDefault "now plus 1 year"
</LocationMatch>

<LocationMatch (.*)\.nocache\.js$>
   ExpiresActive on
   ExpiresDefault "now"
   Header Set Cache-Control "public, max-age=0, no-store, must-revalidate"
</LocationMatch>

Note diference between and directive.

Second issue was more difficult to detect and It's related with appverse-web default security configuration.
The caching problem sequence is the next:

  • User is not logged in
  • Initial HTML module page is already cached (e.g. "initial.html")
  • User browser request initial.html
  • Initial.html is loaded from cache, so no request to server is produced. Spring Security is not checking anything.
  • Initial.html load "initial/initial.nocache.js" using:
<script type="text/javascript" language='javascript' src="initial/initial.nocache.js"></script>
  • Since initial.nocache.js is obviously not cached, it is requested to server
  • Spring security intercept request and redirect to our login URL ( "login.jsp" )
  • Original initial.nocache.js request returns login.jsp contents, instead JS contents.
  • It produces a JS error in browser, and module is not loaded.

We have solved it including "modulename.html" patterns in apache server "no-cache" directives, but it isn't a good solution.

¿Some ideas?

GWT frontend: Implementation class beloging to front end side is being included in front-end compilation (not causing any damage)

The following implementation class is being included in frontend compilation (GWT frontend):

org/appverse/web/framework/backend/frontfacade/gxt/services/presentation/impl/live/GWTAuthenticationServiceFacadeImpl.java

This is a facade implementation that belongs to the server side presentation layer. This should not be included in the front-end side compilation. Just the remote interface to perform the RPC call from the client side should be included, not the implmentation.

This is not a problem at all, as this class is never used in the front-end side but it is necessary to review the POMs structure to see why this is being included and exclude it from front-end compilation.

Maven bug documented. Workaround listed here

The last target in the Maven build failed on compile:

Appverse Web Framework Tools JPA DLL Generator Plugin FAILURE [7.431s]
Failed to execute goal on project appverse-web-tools-jpa-ddl-generator-plugin: Could not resolve dependencies for project org.appverse.web.framework.poms.tools.jpaddlgenerator.plugin:appverse-web-tools-jpa-ddl-generator-plugin:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.4.0, org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.4.0: Could not find artifact org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.4.0 in EclipseLink (http://download.eclipse.org/rt/eclipselink/maven.repo) -> [Help 1]

Turns out Maven is can't pull the dependency jars for core and jpa, the missing jars are
org.eclipse.persistence.asm and org.eclipse.presistence.asm,
both version: 3.3.1.v201206041142

Investigations showed this to be a Maven issue. There's an incorrect upload to the repository that will be resolved.

The issue was independently documented here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=396943
http://www.eclipse.org/forums/index.php/m/991506/

JPAPersistenceService: Consider adding single return (Object) methods analog to xxxObjectArrayList(..)

We should consider whether it is necessary to add methods analog methods to xxxObjectArrayList(...) but returning just one object or this overcomplicates the API.

Currently, if you want to use doInJPA method, for instance, and you are returning just one Object you can do it using the xxxObjectArrayList(...) but you need to return a single element list instead of an object and the castings are more complicated than necessary.
The alternative is to use a ResultType but this obliges you to create the corresponding type.

GWT Archetype: Improvements

  1. Add default database properties file

The archetype does not provide any "db.properties" file.
Even though it is not mandatory to use a database in a project, it should be advisable to add a default "db.properties" at least including the property "db.pkName" which holds the default name for the JPA primary keys (id).
This way this will be ready for developers to start a new project based on this archetype using JPA. Otherwise you might get an error using JPAPersistenceService that it might be difficult to understand.

Class path contains multiple SLF4J bindings after upgrading 1.0.3

After upgrading our project to last release of appverse-web (1.0.3), we have detected this warning on server start:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/development/repositories/maven/org/slf4j/slf4j-log4j12/1.5.11/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/development/repositories/maven/org/slf4j/slf4j-simple/1.5.11/slf4j-simple-1.5.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

This doesn't cause any problem in webapp since is using slf4j-log4j12 instead slf4j-simple (classloading order).
Problems happen when executing junit test-cases, since is using slf4j-simple, and obviously, it doesn't read log4j.xml.

Slf4j-simple is being included by com.googlecode.gwt-validation, and cannot be directly excluded, since it is required during gwt compilation.
In our project, we have solved this problem excluding slf4j-simple from backend, in GWT-Frontend-Resources:

     <dependency>
        <groupId>${main.group}.gwtfrontend</groupId>
        <artifactId>${main.name}-gwtfrontend</artifactId>
        <version>${project.version}</version>
        <classifier>GWT-Frontend-Resources</classifier>
        <type>zip</type>
        <scope>provided</scope>

        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

.launch config files absolute paths

Contributing Developers are going to have MAVEN installed in different locations.
As this was the case with me I have updated the hardcoded values in the .lauch files on my local copy from:

To:

(also possible to set to)

The actual location of Maven that each developer uses is configured in the Eclipse IDE.

I will NOT update this on the main branch as this change has a good chance of breaking the build machine of the existing contributors without warning and is therefore best left to the coordination of a/the team lead. (if change is agreed to)

Sincerely,
Pieter-Jan

HowTo start building new projects

Hi I'm interested in learning about appverse-web and howto build a new GWT app using this framework.

I've created a new project using the archetype definition I've found on the closed issues section. Now, what would be nice to get is a guide for beginners.

This is what I think would be great to know when starting a new project:

(screenshots and maybe some video can be helpful in any step)

1.- How to create the initial project using maven archetype.

2.- How to import project in eclipse .

3.- Eclipse configuration:

-> HowTo start the base project in a Tomcat external server (what we need to configure the run build in eclipse?)

-> HowTo start the base project in GWT DevMode. Is possible to use GWT eclipse plugin? What are steps needed to configure the plugin in order to work with frontend and backend modules? I want a running example and debugging with eclipse.

4.- Description of any appverse-web modules and a basic running example of some functionalities.

Getting started

Are there any Hello World or Sample Apps to learn from, generally getting started Instructions.
I've found these links so far:

https://github.com/Appverse/appverse-docs (contains api level/javadoc style documentation for coding, but not getting started or initial setup)

http://appverse.github.com
http://appverse.github.com/appverse-web/
https://groups.google.com/forum/#!forum/appverse
https://groups.google.com/forum/#!forum/appverse-qa
https://github.com/Appverse/appverse-web/wiki

issue: Not to sure how to get started now that it is compiled.

JSF2 archetype and showcase improvements

The following feature that has been introduced in GWT showcase can be applied to JSF2 archetype and showcase:

  1. Instead of generating the SQL creation DDL scripts in the target directory it is better to treat it as any other resources generating the SQL in /src/main/resources/sql as JSF2 archetype

AppverseWeb GWT module: the mechanism that allows to communicate GWT modules by means URL (when you are not using MVP4g modules hierarchy) should be able to deal with a initial 'place' in the URL

Currently AppverseWeb GWT module provides two ways to communicate modules:

  1. MVP4g modules inheritance to implement multimodules (http://code.google.com/p/mvp4g/wiki/MultiModules#Multi-Modules).
  2. If you want to have completely separated GWT modules (not MVP4G concept of modules), Appverse Web provides a second mechanism that offers you the possibility to call a GWT module from another using URL.

On the other hand, Appverse Web provides history management (back and forward browser buttons and hyperlinks) based on MVP4g history mechanism based on GWT Place service and standard GWT implementation of history management.

The issue with solution 1 (communicating GWT modules by means URL) is that AppverseWeb is not ready to deal with URL including 'places' (a 'place' is a token that indicates that the application has to restore its status to certain point, based on standard GWT Activities and Places).
This is completely necessary when communicating GWT modules by URL so that from one module is possible to pass a token ('place') so that the starting module restores application status to a certain point. An example of URL should be:

(Dev mode URL example: http://127.0.0.1:8888/modulename.html?gwt.codesvr=127.0.0.1:9997#placeUserSearch)

GWTAuthenticationServiceFacadeAsync

Did a fresh checkout from Github in to Eclipse.
mvn clean install reports all success.
Eclipse IDE reports 1 error in module: appverse-web-modules-frontend-gwt-api

GWTAuthenticationServiceFacadeAsync is referenced by import in AuthenticationRpcCommandImpl but can't be found .

Search reveals the class GWTAuthenticationServiceFacadeAsync exists in module app verse-web-modules-backend-frontfacade-pom BUT UNDER THE TARGET FOLDER
(apology for the upper case, this is for emphasis, there is no styling available)

so it is not visible to the module. I've moved this java class file to the src folder to resolve.

AppverseWeb GWT module: Add support to 'session expired'

It is necessary to add 'session expired' control so that when the user session expires this is automatically handled in the GWT front end.
This should be implemented in wrapper ApplicationAsyncCallback providing a default "public void handleExpiredSessionException()" that can be overriden.

Update the Framework Dependencies

Some of the Framework dependencies, Spring, JPA, etc have updates. Update The framework dependencies and plugins to the last ones where is possible

Consider use Spring Data

Spring Data is madure enought to be use as helper of JPA and also offers support for NOSQL dabases.

Maven Framework Inherance Simplification

Simplify the several levels of inherance of Framework as possible an specialize every one to one task following the separation of concerns principle.

The resulting system has to:

  • Allow build all the framework from from a single point.
  • Manage the libraries and plugins

Improve Eclipse m2e plugin lifecycle mapping

I think it's a good idea to wrap the configuration inside a profile. Because Eclipse is not the trending IDE anymore.

    <profile>
            <id>eclipse-lifecycle</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
...

GWT 'strict' compilation error

[INFO] Validating units:
[INFO] [ERROR] Errors in 'jar:file:/C:/opt/maven/repositories/gtrepositories/org/appverse/web/framework/modules/backend/frontfacade/gwt/appverse-web-modules-backend-frontfacade-gwt/1.4-RELEASE/appverse-web-modules-backend-frontfacade-gwt-1.4-RELEASE.jar!/org/appverse/web/framework/backend/frontfacade/gxt/services/presentation/impl/live/GWTAuthenticationServiceFacadeImpl.java'
[INFO] [ERROR] Line 32: No source code is available for type org.appverse.web.framework.backend.api.services.presentation.impl.live.AuthenticationServiceFacadeImpl; did you forget to inherit a required module?
[INFO] [ERROR] Aborting compile due to errors in some input files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.