11

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.

jdi
  • 90,542
  • 19
  • 167
  • 203
Juan Carlos Moreno
  • 2,754
  • 3
  • 22
  • 21

5 Answers5

21

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.

Sergey Grigoriev
  • 709
  • 7
  • 15
  • I understand the frustration of having to switch back to Sencha Architect. It is not our intent to use evil to force you to edit files using Architect. The metadata files that Architect uses allows it to know all sorts of things that a flat file could never know. – Phil Strong Dec 31 '13 at 13:40
  • I understand the frustration of having to switch back to Sencha Architect from your server side editor. It comes down to app builder vs text editor and SA is the former. The metadata files allow Architect to know all sorts of things that a flat file could never know. Having this extra information allows Architect to upgrade your project from say Touch 2.0 to 2.3 and it just works. An example here might be that the click event changes the order of the parameters it passes a listener fn. Architect could update 1000 instances in your project and you never have to know about this change. – Phil Strong Dec 31 '13 at 13:51
  • "Sencha Archtect adds and additional step, it requires you to publish javascript" Not entirely true, you can try the code in the app/ folder after a save, as I discussed here: http://www.sencha.com/forum/showthread.php?296277 – Pierre Arlaud Jan 22 '15 at 09:26
10

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.

sha
  • 17,824
  • 5
  • 63
  • 98
  • 3
    I get the same feeling from trying out this app. You become very locked in to it if you intend on using it for the coding side and not just the visual layout. On the sencha website they say you can use whatever IDE you want, but I think its a bit misleading. Because hand editing files can break compatibility with Architect. Sure you can use whatever IDE you want for your own 3rd party libs though ;-) – jdi May 16 '12 at 23:42
  • 2
    Specially when the IDE does not support all the features that the framework supports for example, profiles. – Juan Carlos Moreno May 17 '12 at 01:23
  • It would appear your view is based on how Ext Designer worked. Have you tried to collaborate with Sencha Architect? See my answer – Phil Strong May 24 '12 at 13:44
4

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.

jdi
  • 90,542
  • 19
  • 167
  • 203
  • 1
    "it should just work" - but it doesn't. Imagine 2 or 3 different developers working with the same Architect project at once. Each developer adds new files and edits the same existing one. The merge conflicts that can ensue are absolutely monstrous and I have to agree with the answer Sergey Grigoriev gave. – Dennis Jul 22 '13 at 20:39
  • This has largely been fixed by removing a lot of cruft from the project file. Please comment if you're still seeing this behavior. – Phil Strong Dec 31 '13 at 13:34
4

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

  1. 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

  2. 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. metadata

  3. app directory - consists of the src of the project you've created. A javascript file for each class. app

  4. 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.

enter image description here enter image description here

Phil Strong
  • 1,014
  • 9
  • 11
  • -1 because "quite easy" is purely subjective. Versioning may be easy but working in team is not, as explained in Sergey Grigoriev's answer. – Pierre Arlaud Jan 22 '15 at 09:29
2

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.

prashanth
  • 445
  • 5
  • 14