How to convert my old projects structure to the new Codenameone initializer project structure based on maven? - codenameone

We have been writing a Code Name One project since a few years ago.
It is already in production.
The project was created using IDE Netbeans which creates all the initial folder structures for it.
Recently, Codenameome provide an app called Codenameone initializ which executes the task of creating a new project from scratch using a new folder structure and using maven as dependencies manager.
We want to convert our project to this new structure and use it from now on.
How could We do that?
Is there a converter for that?

Check out the tutorial here: https://www.codenameone.com/blog/migrating-your-project-to-maven.html
Personally I prefer creating a new project then copying the source files and my personal build hints. Then adding the dependencies. This keeps the project "clean" and helps remove a lot of the legacy stuff from over the years.
This is important since a lot of things changed significantly. E.g. dependency hints are no longer listed in codenameone_settings.properties and are instead listed in the individual dependency. So the file is cleaner.

Related

How can I get sublime text 3 to auto adjust paths in my imported paths, for ES6

I have seen other IDEs that can watch your project structure, and if you move a file from one folder to another, all references or imports to that file will be auto adjusted in all files that reference that file.
I can't seem to find information anywhere so far for how to implement this feature or if there's a package out there that handles this.
I would appreciate any suggestions from anyone that has got it to work. My project is in React, so basically it's to update all the component imports
I developed a new plugin called JavaScript Enhancements, that you can find on Package Control. It uses Flow (javascript static type checker from Facebook) under the hood.
It offers smart javascript autocomplete, real-time errors, code refactoring and also a lot of features about creating, developing and managing javascript projects.
In your case you could use https://github.com/pichillilorenzo/JavaScriptEnhancements/wiki/Code-Refactoring#safe-move
An introduction to this plugin could be found in this css-tricks.com article: Turn Sublime Text 3 into a JavaScript IDE

start project after cloning ng-boilerplate

I'm starting with angular.js and after reading realized that I should use ng-boilerplate to bootstrap my project. But I'm a bit confused, I've cloned the project and stuff and I have a project called ng-boilerplate with all the structure needed, but what now? Do I need to change the project name "ng-boilerplate" to my project name? And what about the folders for example "Home" and "About"? Do I need to delete these folders and create the ones I need? I guess I have to remove some code in other files right? the problem is that I'm starting with angular so don't know what should I remove and what not.
As you can see I'm pretty new with this, am I right with the procedure?
thanks
Well if you read the ngboilerplate documentation carefully you will understand it use. As the first line says:
ngBoilerplate is designed to make life easy by providing a basic
framework with which to kickstart AngularJS projects.
ngboilerplate like many other seed projects, provide a prescriptive guideline about how a project should be structured. To demonstrate the working of the setup some project like this one add implementation for some standard scenarios to highlight how the complete setup works. Remember a working sample is far better than writing lengthy documentation.
The pages that you have mentioned are indeed for demo purpose and you can remove the folders if required. What this organization is telling us is that group your model-view-controller implementation together into a folder. These folders could be one per view or one per feature. The documentation on the site itself is self explanatory here https://github.com/ngbp/ngbp/tree/v0.3.2-release/src/app
Almost all folders of ngboilerplate have some documentation around specifics of that area. Read it to learn more about it.

Using qooxdoo desktop without having to "build" it

in qooxdoo desktop you usually have to develop using the SDK and then "build" your app.
Is there a way to generate something like a qooxdoo.js file with the whole library inside so that you can script script it as you like (like jqueryui or dojo)?
Actually it could be nice to have every widget loaded at runtime like dojo's require("dojo.button") but both the approaches would be nice, just avoiding the build phase.
I hope the question is understandable :)
Thank you everybody!
Don't use the output of the build job to run your code as you develop - as among other things - will minify your code and make debugging very difficult.
If you want to code freely without needing to rebuild when you reference new classes then source-all is the build job for you.
In the root directory of your application, type:
python generate.py source-all
If will include the entire framework in the HTML file generated (you'll find it under source/index.html). This would work well if you are composing the UI from scratch and referencing many new qooxdoo widgets with each browser refresh.
If you add a completely new class of your own, you will need to run the source-all job again to include it.
I use the source build job however for a few reasons:
Habit: source-all didn't exist when I started using qooxdoo
Speed: You can notice a bit of lag it when you refresh the browser to view
your app
References: For a mature app, enough of the framework is
included in the application and its rare to add a new reference and
when you do, its probably in a new class of your own which would
require a re-run of the source job anyway.
I suggest you also look at Default Action Jobs as all the possibilities are explained in detail. Hope this helps.
Please check that thread for a detailed answer: http://qooxdoo.678.n2.nabble.com/Using-qooxdoo-desktop-without-having-to-build-it-td7585015.html;cid=1387453759247-228

What is the expected collaboration workflow with Sencha Architect?

I started a trial of Sencha Architect, and the more I use it more questions come to my mind for its actual feasibility usage in a development environment, one of the bigger questions I have is
In an environment that you can't edit the individual files in different editors, how can multiple people collaborate in developing different parts of a site, for example
app/models|components|views/Model1.js <- In charge of developer one
app/models|components|views/Model2.js <- In charge of developer two.
In a regular environment you could use git, for example, to distribute each file but in architect, you are not expected to edit files manually (which sucks because features like profiles are not exposed in architect). If you do edit them manually, it will cause problems or it may overwrite your code back to whatever data is on the project file so I am wondering what is the proper, or expected collaboration workflow with Sencha.
Having read the above posts, I still can't believe that keeping Sencha
metadata files in code repository and generating ALL JavaScript from metadata is suitable for big projects.
The idea of Sencha Architect is to keep the code not in javascript files, but in JSON metadata, and whenever you need to edit a JavaScript code, you have to use IDE and edit metadata. Phil Strong said "We ask that you continue to use Architect as your editor and doing so with 20 engineers is perfectly safe using Git or SVN.". Of course this workflow is very profitable for Sencha, it forces 20 people to use a licensed Sencha Architect, because to change a single line of JavaScript code the developer must use Sencha Architect.
When two people edit the same file, IDE updates metadata. Then they check-in the file into a code repository, and one of them has to resolve conflicts, so the developer has to merge two metadata files, not JavaScript files.
The whole idea of not letting developers to edit JavaScript unless they use Sencha Architect is counter-productive, because the same person can be using his favorite IDE for both Java and JavaScript development, or Python and JavaScript. Doing both client and server programming in the same IDE is faster than switch between two IDE's. The reality of a big project is that you have multiple teams around the globe who work with different IDE's, you also may have a short-term project implemented by a contractor who also has his favorite IDE.
ExtJS is a well designed framework, you don't need SenchaArchitect to modify a single line of JavaScript code.
When coding in JavaScript, I save my JavaScript file and refresh browser, and see the changes immediately. Sencha Archtect adds and additional step, it requires you to publish
javascript (generate JavaScript from metadata), and the bigger the project is, the longer is delay. Often I have to modify JavaScript files in production, sometimes changing a single line fixes the problem, again, I have to use Sencha Architect to re-generate this single line from metadata.
I use Sencha Architect for quick prototyping only, then check-in generated files into code repository and continue to edit JavaScript manually. With this approach I can use a version control system to see the history of JavaScript. If I checked in JSON metadata into
a VCS, then I would not have the history of JavaScript, I would have the history of JSON metadata which is counterintuitive.
I think that having metadata for GUI form is OK, but the limitation that MVC controller level has also to be generated from metadata is not OK.
While I appreciate very much Sencha's effort in creating useful and full-featured dev environment I don't think Sencha Architect is quite ready for relatively big projects and teams of developers.
I original Architect software very useful for quick prototyping and designing complex UI structures, but then again - after you figure out the way your UI elements will lay down in JS file - often it's easier and faster to copy-paste existing JS code.
I don't think this is the answer you were looking for, I just wanted to share my thoughts.
When I had searched for this same topic, I had found that it is the metadata/ directory that is the important meat of the project, and that all of the components are separated out into their own metadata files. This, along with the root level project files, is probably the important part for version control. The app/ is regenerated on save and probably can be excluded from version control.
The main xds project file containers more general references and will probably change less often than the metadata components. But it would change when new components are created or project/app level settings are modified.
Ideally, if you just check in the root files and the metadata folder, it should just work.
Working in a team with source/version control is quite easy with Sencha Architect. An Architect project is all enclosed in a project directory. Inside it's made up of n parts
project file - consists of a small amount of data used by Architect to open and maintain your project. It's the single file you can double click to open it
metadata directory - consists of the files that describe all the pieces of your project. Each class (controller, view, model, store, resource) has it's information stored in it's own file.
app directory - consists of the src of the project you've created. A javascript file for each class.
other root files - an app.html and app.js which is the launchpad for your application and what get's run when you preview your application. This is also where your packager.json, app.json would go.
The point of me describing all of this is to show you that the files generated by Architect are pretty much identical to what you would have created in your favorite editor by hand. The only additional information is the metadata and the project file. The metadata is all JSON.
FOR NOW!!
We ask that you continue to use Architect as your editor and doing so with 20 engineers is perfectly safe using Git or SVN. When a dev makes a change it changes both the metadata and the app for those files.
I asked the same question to Aaron from Sencha in a private message. He suggested to check in the entire project structure including app and metadata.
It works, we did one flow in our team.

Xcode 4 - how does it know what build configuration to use for nested projects?

First time poster, this site is invaluable for answering my questions - so thanks to everyone who contributes!
I have an Xcode 4 project with multiple nested projects (which build as libraries for the main project). Everything is working fine but one step baffles me:
How does it know what configuration to build (and link) for the nested projects? For example my main app has a Distribution configuration. I want it to build and link against the nested projects' Release configurations. And it does!!! but how does it know that? I can't find anywhere where I would specify it.
After scouring the internet to no avail - I'm thinking it might be using magic...
I may have a solution to your question:
If you look at the scheme settings of your included frameworks, they by default have defined Release as configuration to use when you build for Archive. Would be possible that Xcode uses this setting when you build your main project for Archive (and would actually make sense).
(For me this doesn't work, won't find the headers, maybe you have an idea?)

Resources