Giter Club home page Giter Club logo

md2-framework's People

Contributors

afuch05 avatar alexj2510 avatar carolinguelpen avatar dagefoerde avatar dexter-03 avatar fabianwrede avatar felixgit4dev avatar fwpunsher avatar hkoel01 avatar janernsting avatar julia65 avatar maltemoeser avatar nandokoch avatar pstobias avatar riegerchris avatar sacnl avatar soeren123 avatar the-other-one avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

md2-framework's Issues

MD2 wizard should gather more info

The wizard should gather additional information on the to-be-created project to be able to generate the main block in the controller part. This requires input of the app name, version, etc (see required elements of main block).

The Xtext help provides info on extending the wizard.

Non-resolvable parent POM for de.wwu.md2.framework:de.wwu.md2.framework:[unknown-version]

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for de.wwu.md2.framework:de.wwu.md2.framework:[unknown-version]: Failure to find de.wwu.md2.framework:de.wwu.md2.framework.parent:pom:0.3.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 74, column 10
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project de.wwu.md2.framework:de.wwu.md2.framework:[unknown-version] (C:\Users\Ali-Haouari\Desktop\Eclipse Noen2\MD2\md2-framework\de.wwu.md2.framework\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for de.wwu.md2.framework:de.wwu.md2.framework:[unknown-version]: Failure to find de.wwu.md2.framework:de.wwu.md2.framework.parent:pom:0.3.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 74, column 10 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Application context holds activity-specific state

While Activities are recreated when an app is restarted, Android keeps some things in memory, for example, MD2Application.
MD2Application, however, contains references to UI elements (via mappings, possibly also validators) that are specific to one lifecycle. When an activity (but not MD2Application) is created again, the mappings point to stale UI elements and do not have any effect.
The global context should not hold references to objects that will be recreated when the apps is newly started.

To see this effect in action, look at the simple app in wwu-pi/md2-testApps@85c2e8a

  • close it (via back button)
  • open it again => mappings not working
  • close it and remove it from cache (Running Services -> Show cached processes)
  • open it again => mappings working again, because context has been created anew

Back end serializes single-element lists to a single element in JSON instead of array

This might be expected by clients of /first, but the Android ManyContentProvider is surprised and cannot parse the result, for example
{"contact":{"__internalId":"1","familyName":"Mustermann","givenName":"Max","phone":{"__internalId":"2","number":"012345-45321","kind":"0"},"dateOfBirth":"1985-01-01T00:00:00+01:00"}}
A client expecting a multi-valued return type (with an arbitrary number of entries, possibly also one), would expect the following:
{"contact":[{"__internalId":"1","familyName":"Mustermann","givenName":"Max","phone":{"__internalId":"2","number":"012345-45321","kind":"0"},"dateOfBirth":"1985-01-01T00:00:00+01:00"}]}

Required Android layout attributes not set during generation

The required Android layout attributes layout_width and layout_height are not being set for a FlowLayoutPane with a Spacer during generation. Example:

package com.example.md2.sessiontest.views 
    FlowLayoutPane sessionListPane (vertical ) { 
        Label titleAbbreviation { text "Abbreviation" } 
        TextInput abbreviation 
        Label titleLabel { text "Title" } 
        TextInput title 
        Spacer
     }

The generated code for the Spacer is:
<TextView />
The app crashes with:

10-11 16:40:37.401: E/AndroidRuntime(429): FATAL EXCEPTION: main
10-11 16:40:37.401: E/AndroidRuntime(429): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.md2.sessiontest.android/com.activenetwork.md2.sessiontest.android.controller.SessionListPaneActivity}: java.lang.RuntimeException: Binary XML file line #38: You must supply a layout_width attribute.

This requires manual fixing the generated code in order for the Android application to build and run.

Also, the graphical layout editor in Eclipse complains that

"sessionListPane" does not set the required layout_height attribute:
 (1) Set to "wrap_content"
 (2) Set to "match_parent"

(but the app builds and runs)

Move static parts of iOS apps to library

Similar to Android, the static, generic parts of an iOS app should be included as a library. This would enable a clear structural separation between generated parts and target platform in the resulting app.

Methods of MD2GeneratorUtil should not be static

The state of the qualified name provider etc. should be reset on each new generation. Thus, its methods would best not be static.
Otherwise, state (wrt names) from the previous generation might leak into the next generation.

Example: first version of an app contains a button named "reset" and an action named reset. Then, the generated Android code contains errors, because the class .actions.Reset.javacontains a class Reset1 (related to a different bug: line 160 of AndroidGenerator.xtend should use getName as well).
Renaming the button to, e.g., "resetBtn" does not help directly, presumably because the old name mapping is still in the cache. Restarting the MD2-Eclipse instance and regenerating again resolves the error.

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.