PDA

View Full Version : The Designer ate my metadata!



DigitalDog
3 Mar 2012, 12:42 AM
I opened my project and went to the designer settings tab, changed a few options and tried to preview the project and it complained about the url or something (I didn't really take note).

When I went back to the project and clicked on one of the views, it gave me the "TypeError: undefined..." message with the options to "ignore, restart or exit the designer".

I chose "ignore" and noticed a few views missing, so I restarted the designer a couple of times as I kept getting the "ignore, restart or exit the designer" message and suddenly I had a blank project. After comparing the project folder to other designer projects, I noticed the metadata folder was missing.

The project still runs perfectly in the browser without any errors and all the views are there, however the designer has gone on holiday.

Is there any utility to regenerate the metadata from the actual files or any other way to rebuild the designer project file?

Any help would be appreciated, Thanks.

I'm using version 2.0.0 Build 298

aconran
5 Mar 2012, 5:24 AM
DigitalDog -

There is no way to recover from such a situation. Initially we would only allow users to Quit or Restart Designer to avoid the cases where a project become corrupted and to prevent this from occurring.

Then what we found was 90% of the cases the error was actually ignorable, looks like you hit one that was not. :-/ Any chances you could tell us how you reproduced this error?

As always, we recommend that you continue to use source control in conjunction with your designer project.

DigitalDog
6 Mar 2012, 10:07 PM
Unfortunately, I can't afford to have these types of problems, so I had to drop the designer and convert the code to a normal project.

All I know for sure is I didn't edit the project itself. I only fiddled with the designer settings and tried to preview the project and then it came up with that 'Undefined' error.

I'm using Windows 7 64bit out of interest.

aconran
6 Mar 2012, 10:16 PM
Unfortunately, I can't afford to have these types of problems, so I had to drop the designer and convert the code to a normal project.

Well it's certainly in its beta stages at the moment and should not be used for production app development. I hope that you will re-evaluate it as it comes out of beta and is more stable.

Thanks,

cstuber
7 Mar 2012, 5:06 PM
+1. This same thing happened to me this afternoon.

I am running Designer 2 on Windows Vista. If I remember correctly, I had deleted a link to a tab panel and deleted another panel. I then created a new navigation view, made a few config settings and clicked save. I then got repeated popup messages mentioning the error. I shut down Designer (my only option) and restarted. My project content has gone bye-bye.

Thinking back on the other work I've done in Designer 2, it seems that it sometimes starts acting funny after I delete objects. It seems the more I save, the less likely I am to run into this symptoms.

For what it's worth, I think Designer 2 is a fantastic tool and I'm not about to walk away from it. I am bummed, however, that the error caused a situation where further development of my project in Designer is impossible.

Thanks for your hard work, guys!

aconran
7 Mar 2012, 6:31 PM
We highly recommend that if you are working with a designer project you use some source control.

We have some basic documentation regarding working with a designer project and git forthcoming. The best part of this is if its just a local project you don't have to worry about synchronizing with a server and setting it up, etc, etc

jaami
24 Jun 2012, 3:11 PM
You should provide command line utility to regenerate metadata. I use Sublime and sometimes i need to use Sencha Architect. Any change made in sublime is gone when Sencha Architect is opened and that is because of metadata which is not updated if Sencha Architect is not used. Is there a way to regenerate metadata from exiting code and directory structure. You guys need to speed up your work on Sencha Architect because it is very slow and crash anytime. I hope you will help me on how metadata can be regenerated or configured to avoid crashing of Sencha Architect.

stephenr85
6 Aug 2012, 1:27 PM
You should provide command line utility to regenerate metadata. I use Sublime and sometimes i need to use Sencha Architect. Any change made in sublime is gone when Sencha Architect is opened and that is because of metadata which is not updated if Sencha Architect is not used. Is there a way to regenerate metadata from exiting code and directory structure. You guys need to speed up your work on Sencha Architect because it is very slow and crash anytime. I hope you will help me on how metadata can be regenerated or configured to avoid crashing of Sencha Architect.

I second the request for a way to edit the code files directly, or regenerate the metadata. Seems like, if there is a conflict/difference encountered in the metadata and code file, Architect should scrap the metadata and rebuild from code. That would allow us to open any project in Architect (which I would've assumed was possible already).

aconran
10 Aug 2012, 10:21 AM
I second the request for a way to edit the code files directly, or regenerate the metadata. Seems like, if there is a conflict/difference encountered in the metadata and code file, Architect should scrap the metadata and rebuild from code. That would allow us to open any project in Architect (which I would've assumed was possible already).

This works in the reverse. If there is any difference, Architect will rebuild the code from its metadata.

stephenr85
13 Aug 2012, 7:41 AM
This works in the reverse. If there is any difference, Architect will rebuild the code from its metadata.

Yeah, I noticed that (after some frustration trying to make simple tweaks to the code by hand), but here's the thing: a GUI's primary purpose is to improve efficiency. I'm new to the framework, and the GUI has drastically improved my productivity during the learning curve of this project. It's a great tool, but I am feeling comfortable enough with the API now to start editing the files directly (because sometimes, that is more efficient -- project-wide search-and-replace being a prime example for amateurs and experts). Not having that ability makes using Architect on a project an "either-or" kind of issue, which I think is a huge detriment. Some developers prefer to work in a GUI, some prefer to work in code, but many of the more experienced prefer a mix, leveraging the more efficient aspects of GUI and raw code editing respectively. Ultimately, the GUI provides a better surface-level induction to the framework; whereas, if you REALLY want to know the framework inside and out, you have to code by hand (at least a good majority). The tool should accommodate both kinds of developers, since there's a wide range of strengths and experiences involved when dividing up tasks for a project, and both dev approaches are valid. I understand that maybe it is more convenient to build the code from metadata, and maybe that should still be the primary method, but it would be great if there were at least a way to manually say "rebuild metadata for this code file." I can't think of any other framework GUIs that take this metadata-over-real-file-content approach, which is why it seems so bizarre, and, frankly, unacceptable. There are several aspects of the tool that overall make it feel as though its still in its infancy. That's a natural stage of a product, but I'd hope to see some light at the end of the tunnel on the issue. This is the only one where was (and still am) thinking "No way!"

Again, great tool, loving the framework, keep up the good work! I just wanted to let you know that, of the things I see lacking in the tool (and a few bugs), this is the only one that makes me want to abandon and warn against using it.

aconran
13 Aug 2012, 9:30 AM
stephenr85 -

Thanks for the feedback. We're working on making this a better process. As long as we are generating actual JS source code though this is a really hard problem.

jaami
13 Oct 2012, 5:10 AM
Aconran

i (http://www.sencha.com/forum/member.php?802-aconran) would like to know either metadata is still required as part of Sencha Architect or my project created in any other editor can be opened in Sencha Architect.

aconran
15 Oct 2012, 9:13 AM
The metadata is what drives the project and will always be a requirement.

jaami
16 Oct 2012, 7:37 AM
That is not the issue. I have no problem with that. Actually, my need is to have metadata regenerated from my project source files which you can read from previous messages. you can understand what i mean by regenerating of metadata. Is there any option or there will be no option even in future?

aconran
16 Oct 2012, 8:38 AM
There is no intent to implement that at this time.

jaami
21 Oct 2012, 12:21 AM
I delete metadata folder and now i see the loading.. message with progress bar but sencha architect never opens.

Does sencha architect has the ability (option) to fix corrupt metadata or create it if no metadata folder is there? if not then does it mean if metadata is gone then my whole project is gone? May i ask why its a problem that sencha architect cannot fix broken metadata files somehow by compiling source code? Is it not unnecessary burden to carry metadata with my actual project code while i have no idea what to do with metadata and why my project source code without any problem is useless because of metadata is corrupt which i never wrote and there is no documentation of metadata and no help how to fix that thing?

Of course sencha architect is making metadata behind the scene so one button in sencha architect to create or fix metadata is not an intent to even think about? What do you think will be the big problem to let users have this option of re-creating metadata? Why that missing simple option in sencha architect is real big problem for you guys? We know sencha architect does generate metadata behind the scene but why hiding this option from users and why secha architect does not fix all issues with metadata folder when it opens my project? Whats the mystery behind metadata?

It is good that in the MEAP book and in almost all videos on sencha site, sencha architect was not used for code examples. But because of that reason, those user using sencha architect feel difficulties in learning.

I like coding by hand and use sencha architect to see syntax errors. because of metadata i was keeping 2 copies of my project and was changing same thing on both sides. but i have to use sencha architect to save time but i really dont like to use GUI because i want to learn syntax and in many cases text based IDE is much more easy and faster than sencha architect.

I dont mind using sencha architect if it make metadata folder every time when project is opened. So, no need of command line utility and no need to get rid of sencha architect and metadata if at least metadata folder is created somehow automatically. but sure i want to code by hand and i hope you guys will help users. otherwise the last option for me will be the Titanium.

aconran
22 Oct 2012, 9:38 AM
I delete metadata folder and now i see the loading.. message with progress bar but sencha architect never opens.

As stated above, metadata is what drives Architect.



Does sencha architect has the ability (option) to fix corrupt metadata or create it if no metadata folder is there? if not then does it mean if metadata is gone then my whole project is gone? May i ask why its a problem that sencha architect cannot fix broken metadata files somehow by compiling source code? Is it not unnecessary burden to carry metadata with my actual project code while i have no idea what to do with metadata and why my project source code without any problem is useless because of metadata is corrupt which i never wrote and there is no documentation of metadata and no help how to fix that thing?

If Sencha Architect has corrupted your metadata, we will gladly look into what bug possibly could have triggered this and help you fix it. If you deleted the metadata folder on your own, there's not much we can do for you at this time. Assuming that no user mucked with the code on the file it would be possible for us to regenerate metadata. This is a good feature request and may make it into the product at some point.



Of course sencha architect is making metadata behind the scene so one button in sencha architect to create or fix metadata is not an intent to even think about? What do you think will be the big problem to let users have this option of re-creating metadata? Why that missing simple option in sencha architect is real big problem for you guys? We know sencha architect does generate metadata behind the scene but why hiding this option from users and why secha architect does not fix all issues with metadata folder when it opens my project? Whats the mystery behind metadata?

I think you are making the assumption that we generate metadata from the source code. This is incorrect. We generate source code from the metadata. Sencha Architect does not really care about the generated source, you can delete it and each time it saves it will regenerate it from the metadata on disk.



I like coding by hand and use sencha architect to see syntax errors. because of metadata i was keeping 2 copies of my project and was changing same thing on both sides. but i have to use sencha architect to save time but i really dont like to use GUI because i want to learn syntax and in many cases text based IDE is much more easy and faster than sencha architect.

I dont mind using sencha architect if it make metadata folder every time when project is opened. So, no need of command line utility and no need to get rid of sencha architect and metadata if at least metadata folder is created somehow automatically. but sure i want to code by hand and i hope you guys will help users. otherwise the last option for me will be the Titanium.
If you really like coding everything by hand then Sencha Architect may not be the tool for you. There are plenty of other raw JavaScript editors out there that you can use - Sublime Text, Aptana, Webstorm, etc. There's nothing to say that you couldn't use Architect just to generate your views and then copy and paste them into your raw JS Editor. The caveat here would be that you could never return to Architect.

alile
8 May 2013, 3:06 PM
this just happened to me in 2.2.2 build 971. I will also formally state that the entire concept of the metadata seems ludicrous and needlessly redundant. I did not have anything in source control yet as i was just rebuilding a 2.0 project that was not working in android.

jaami
13 May 2013, 9:33 PM
thats real fun. they love metadata

you was not there when sencha architect was deep down into hell and still too far from gates of hell.