-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Aurelia project templates for version 1.0.0-beta.1.2.1 #364
Conversation
VSIX is available at https://ci.appveyor.com/project/sayedihashimi/side-waffle/build/1.0.390 for anyone who has time to try it. @madskristensen can you try it? |
@madskristensen - could not be happier to do it - will post my findings in this thread. |
Tried the ES2016 template. VS did not restore all the packages when loading the project. But that is a problem I also have with the skeleton-navigation project itself. So that's not a problem of this template. |
Are you referring to VS not restoring the JSPM packages or npm packages? VS doesn't have support for JSPM yet |
@madskristensen Given that @Thanood managed to get something going (and I have not), I will start very cautiously by saying that I installed this TemplatePack.vsix and after successful install and VS reboot here is what I see as available templates: None of these is Aurelia templates. Am I fetching the incorrect .vsix file? Have VS version that does not support Aurelia Template (highly unlikely) |
@adriatic the templates are under the Also FYI I think it's best to follow the following steps to try it out.
We will need to work to create global.json, src folder but we are not there yet. |
It should definively be in the web node :-) - Aurelia is a front end development framework first and the fact that it is written in JavaScript second I will run the template now, and expect to give you a ton of feedback as I am working with Guy Bedord (jspm author) on making jspm a lot more aurelia friendly, which issue (assuming that you care about it) should give us a plenty of ideas to discuss |
@Thanood @madskristensen there is a gulp task in the project called When testing the templates myself I had some issues getting the NPM and JSPM to automatically restore as well. What I found out was that the Task Runner Explorer was not recognizing the gulp tasks. Once I finally got it to see the tasks everything ran fine. |
@RandomlyKnighted Can't you add an npm script for |
It should. I've never actually used |
@RandomlyKnighted I think that is better than using Gulp for it |
Gentlemen Can you all please give the chance to present a global view of Aurelia building process so we can map it to Visual studio in a "frictionless way". I spent a great deal of time thinking about it - and it would take me no longer than 30 minutes to reassemble it from my existing articles. Then, we can discuss all details that are mentioned in last couple of hours? Would this work for everyone? |
@madskristensen Sorry for not being precise. It was Doing that with administrator privileges usually resolves the issue (and it did in the case above). @RandomlyKnighted I didn't have any problems regarding the gulp tasks somehow. |
The document below is the copy of the article being written to synchronize the design discussion between @madskristensen and @guybedford (jspm author) -- all done in the context of the recently initiated initiative to make Aurelia a prominent member of Visual Studio supported frameworks I am posting it here to ensure the top down approach that https://github.com/aurelia-tools/aurelia-vs project needs - establishing the common vocabulary being the obvious beginning. The intent of this document is to present the view of the process of handling the three files shown on the Image 1 below) and to discuss how to do that best using Visual Studio resources Simplified view of building Aurelia application processExecutive SummaryThis article presents the meaning of the seemingly simple process defined as successive invocations of the standard node tools
and explains it in terms of transformations done on the two key files used in that process 1. package.json2. config.jsusing the DescriptionTypical aurelia application structure is shown below - and I highlighted the three key files that need to be properly maintained by Visual Studio in order to offer best development experience to Aurelia developers: I will use a bit more complex application than the original skeleton-navigation to illustrate some of the additional issues that do not come up in that original - as it uses a complex third party SDK (Telerik's KendoUI). STEP 1 - provide tooling for linkingrunning the This section of the file package.json is used as the definition of all tooling that Aurelia app will need in the process of application tooling described next Step 2 - linking (adding run time modules)running the Note that Step 3 - loading and runningThis process is initiated by running the command can be performed by different tools, where browserSync is used most of the time. ConclusionUsing this "process model" we need to map it into Visual Studio "services" without losing the semantics of NodeJS based development process. In order to ensure that such loss does not take place, the next steps consist of gradual refinement of details of each of these steps. |
I believe that such approach would be less than ideal as I am trying to explain in my post above Note that I have not finished it because I do not want to overwhelm folks with too much details. Assuming that there is somebody who cares to know more, I will gladly expand it |
@sayedihashimi with reference to your advice above I genuinely believe that we should raise the level of abstraction discussing * Anything Aurelia* as proposed in my note above as any feedback on this SideWaffle based template would be non-productive. Just as a few examples: I create a new product just using the vs2016 template you provided - the simplest possible case. The project instantiation tool well over 15 minutes (all spent creating app dependencies: Note the attached npm/bower log - vs npm-bower log.txt which has indications for more error conditions than any developer would expect to handle. Use this one as an example and tell whether you would "trust" that the project being built has any sense :-)
The expectation of an average user (who did not took the time to look at the log which scrolls so slow that anyone but would give up) is to hit Ctrl-F5 and see what this app looks when running. Well, he / she would see this: I know what is missing (go behind the Visual Studio, use cmd.exe at the proper folder and run npm install to get the application to a "properly linked state" to be able to run - and hope that VS would resume from there :-) - however, I spend more than 10 years doing everything possible with VS and 2 years learning NodeJS based development, which fascinated me to the point that I completely dumped VS, so I know how to recover from this. My intent here is not to criticize the current state of the Aurelia template, but rather to get is to discuss it from the top and simplify the whole process - something that would be quite difficult if we do not start from the top |
@adriatic thanks a lot for your comments. I've been slammed and haven't had a chance to try this until now. Here is what I found. Before I start my comments, let me thank @RandomlyKnighted for all his work here, it's greatly appreciated, he has done all the right things template wise, and from that perspective it looks good. Here is what I experienced.
I think my internet connection was a bit slower than @adriatic. It took _more than 25 minutes to complete_. I also noticed some errors in the output along the lines.
In the same solution I went through File->New Project->Aurelia to see if the restore would be faster because the packages were cached. It's looks like it's taking just as much time as the previous project. After this I tried to simplify this a bit so I tried the skeleton-typescript-asp.net5. Here is what I did.
The result in error list is below. It took about 4 minutes to restore here. Below is a snippet of error messages in the output window.
I agree with @adriatic that we need to take a step back and rethink this experience. I'd like to understand what the experience is for non-windows/VS users here. Anybody who is familiar with Aurelia development have 30 minutes to chat with me? |
Whatever we decide needs to be done here for the template should probably be done for the skeleton-navigation template that @sayedihashimi linked to. That way any future updates to the templates will have whatever changes we decide on. |
@RandomlyKnighted we may need some updates to Visual Studio itself, I'm not sure at this point. I'm going to have to investigate and figure out what is needed. |
@sayedihashimi thanks for reading my long post - and I appreciate your perception of the situation at hand ("we need to take a step back and rethink this experience") even more. It is my experience that most people are terrified of revolutions, regardless of their size (size of revolutions, not the people :-)) Visual Studio is at the moment nominally supporting "node based development", but nobody with "node based development" experience would not even consider using Visual Studio in their work. Despite a very positive changes in MS corporate culture and vision (accepting the OSS "religion" for example), it would take a lot more than enriching SideWaffle with some "node friendly" concepts) - the changes would have to take place at a lower level in order to match the performance. Let's use the jspm / systemjs based development as the example - since it provides us with a great example of dreadful performance experience in VS. As I tried to explain in this post (a copy if its summary shown below) that process of building Aurelia application (which as we well know is a node based development process) consist of running three node applications: Note that spawning a shell process in the background which would invoke Given my recent rediscovery of VS Code (I tried it once, long time ago, when it was not really doing anything except being the editor), I am now beginning to wonder whether it makes sense to add the correct support for node based development, when VS code already has that. |
@RandomlyKnighted allow me a comment on Aurelia templates issue, by pointing you to the recent discussion with @EisenbergEffect: https://github.com/aurelia-tools/aurelia-vs/issues/6 The genesis of that discussion is simple: being unhappy with the Visual Studio current set of templates I got in touch with @madskristensen and proposed a complete rework for these templates. Immediately after that, I also told @EisenbergEffect that I am planning to do that work. Rob responded with his own view of what all needs to be done to get this be done and asked me to take over that whole project. So, being happy that the best person will handle these issues (repeated below for your convenience)
I left that "battlefield" and am only making myself available to @sayedihashimi in the much narrower area of building tools |
@adriatic is there any drawback (besides size) to including |
@sayedihashimi the
This is task took a bit less than 5 minutes on my 4 years old machine, running Windows 8.1 - and the same task takes over 30 minutes when invoked by VS. This is the first surprising thing I mentioned before. The next issue (which is present for the longest time) is the inability by the team that manages Summary:I described just the first step of my article describing the complete building process. Let me know it this helped, if this discussion even leads to something good and if you want to continue it. |
Wow. This is very eye opening. I honestly had no idea the VS npm experience I have a question. We are working on a CLI for Aurelia. Would it be
|
Yes that's possible, I'd rather a wpf dialog with options instead of raw command line params but we can discuss more details. When is the cli going to be in good shape to prototype a wizard? In the meantime I have some ideas which may unblock us. I will play with this and get back here. Regarding underlying npm issues, I talked to Mads and they are investigating. Let's keep this PR open for now. |
@sayedihashimi - I am quite concerned that I might create the perception of pushing my nose where it does not belong. Aurelia's team and Microsoft certainly do not need me to tell them how bad is the current Visual Studio support for Node based development. You are also aware that Aurelia has additional requirements because it is based on ES5 version of Javascript and needs additional processing (Babel transpiler). I simply became impatient thinking that you might not see the depth of the hole we are trying to fill here :-) |
@sayedihashimi It definitely seems that some general work on Node-based workflows needs to be done. This would benefit Aurelia but also a lot of other scenarios. We could easily build a WPF dialog to front our CLI. The CLI would be ready for this type of integration in another week or so. I'm unclear how it would all work from a "new user" perspective given that the Aurelia cli must be installed and that it itself runs on Node. But, if there's a way to do this smoothly, we would definitely be interested in pursuing it. |
We need open and honest feedback from experts to ensure that our products are providing a good experience. You're feedback is greatly appreciated, please keep it coming.
Yes. The JavaScript experience is owned by another team but we are working with them on needed features.
It sounds like we are looking into it and hopefully going to make some changes.
We could use the version of node that VS ships. Other than node is your cli xcopy deployable? If so and if the size is not too large we can include it or download it on demand. If it's not xcopy deployable then I think we should create a separate vsix which has the templates + detection logic to look for the cli that was installed by the user. Once your cli is ready for prototyping let me know and I'll play with it. In the mean time the biggest problem that I'm seeing is the long wait after File->New Project. I'm going to play with this to see if I can solve that. Hopefully I can find a way to work-aound it. I am working on a new way to author templates `pecan-waffle' which may help us here. I'll create a prototype vsix specifically for this. I am thinking to try the following.
|
@sayedihashimi Thanks for all the great work you guys are doing! Regarding our CLI, it requires Node 4.x or above. It has a single dependency, npm. Other than that it has no 3rd party dependencies. The CLI itself automates NPM to install dependencies during application creation time and throughout the development process. It does this in order to augment the NPM installation workflow with additional steps required for client-side package management when combined with a module loader. I'm not sure if it's x-copy deployable to be honest. It has no dependencies, but perhaps the npm dependency would be a challenge? The CLI should be ready enough in another week or two. |
I'm not sure what the Aurelia CLI might bring to the table which I don't recognize (yet). I think this is really a great idea. Maybe we can even extend that (once it is ready for use/testing, of course) to be able to choose some project items or leave them out. For example if I don't want the complete test suite for some reason (karma, protractor etc.) I could choose to not install that which would speed up project creation by a significant amount. @EisenbergEffect If I remember correctly the Aurelia team already has such plans for Aurelia anyway (albeit web based). I think maybe as an alternative the templates together with the above mentioned wizard/CLI could optionally provide a minimal skeleton to improve project build times. |
@EisenbergEffect @Thanood yes, I think integrating with the CLI will be the best way to go long term. I think you'd want to develop a UI with WPF and let the users pick various options, and then invoke the cli tools to create the project. I'm actually working on a .NET Core CLI experience for project creation. We're planning to integrate that into One ASP.NET in much the same way. The wizard should also have the ability to detect if the cli tools are installed. If not then it can help the user acquire them. In the meantime the problem here is not unique to Aurelia, so we need some solution. I've developed a new way to create VS templates ( I've been working to refine my new template approach and I'm using a few different projects as samples. I've added the template content that @RandomlyKnighted has here into my prototype vsix. The vsix I'm working on is just for my testing, if you think this will be useful I can help get it kicked off. You can download it from https://www.dropbox.com/s/6zuvgo51d966ef2/NodeServices.zip?dl=0. In the node at This method of template creation is different from how standard VS templates work. In this case all the work is done behind the scenes on the file system and then the wizard adds the project files to the solution. In this case when you pick Aurelia the following happens:
The first time you run the script it has to download some files to The end result is that on my box the 2nd project creation took _3 minutes_, and when it was complete the Known issues in the vsix
Since the CLI is on the long term horizon, if you want to use this in the mean time, I would recommend the following changes.
I think if there was a dialog with the text of the script output going by, the 3 minute delay wouldn't be that bad. We could work on reducing content but besides that I don't see any easy ways to decrease the time to project creation here. When I created the project from the command line it took about 2 minutes. I may be able to improve the speed but not likely to be significant. |
@sayedihashimi I believe that @EisenbergEffect has somewhat different (a lot better) CLI related ideas - but he should be the one to explain that. I am responding to your message, despite my decision not to participate in Visual Studio support for Aurelia (as stated above). @EisenbergEffect will certainly be a better partner for you with respect to Aurelia. As my group of community based Aurelia developers is very interested in providing Aurelia developers with best possible development tools and because this area is my "specialty" for more that 30 years, we will continue this same thread in the context of Visual Studio code, environment that is specifically created for NodeJS development. I believe that we can make some non-trivial contributions in a lot shorter time than we are discussing in this thread. I would be delighted to see you even as an observer in that project, as there are many cross pollination aspects present. |
@sayedihashimi You've been busy. This sounds great. @RandomlyKnighted Can you look into the new template infrastructure that @sayedihashimi has put in place? @sayedihashimi How far off are you from creating the VS UI over core CLI for asp.net? It would be cool if we could work on that at the same time as you, so we could share experience, ideas and solutions. If you aren't quite ready yet, that's perfectly fine. We've still got a lot of work to do on our CLI. But, whenever you are ready to do that work for asp.net, we want to work in parallel on the same stuff for Aurelia. Just keep us in the loop. Integrating with VS is pretty much a mystery to me. I can pump out WPF code no problem though. I used to do that a lot 😉 @RandomlyKnighted Do you have any WPF experience. Any interest in helping us with the VS/CLI integration? |
@EisenbergEffect Sure I can take go through the template structure. I've been following I have very little WPF experience. As long as I'm not having to do any MVVM work with WPF 😃 I think I can manage integrating the two together. |
@RandomlyKnighted Excellent. I can help you on the WPF side of things if needed. @sayedihashimi On a related note, do you have connection with the VS Code team? I've been trying to get in touch with them for a while. The TS team tried to connect me but the VS Code guys never responded to the emails. I think it may have been bad timing. If you happen to know anyone and can make an introduction, that would be great. If not, not biggie. Just thought I would mention it. There are a lot of things we'd like to do in that tool too. |
@EisenbergEffect What all do we want to include in this WPF window? For example, are we just wanting a combobox with the 2 templates listed or do we want something more complicated? |
Email me details about how you'd like me to participate. If it's related to asp.net or Visual Studio then I may be interested.
We are just now starting on the CLI experience for I'll have to work with @RandomlyKnighted to get him started with the new vsix project. Any preference on the name of the extension? AureliaWaffle/Aurelia Templates/etc. I'll have to clean up some code and then create the new project and wire up everything. |
@RandomlyKnighted
@EisenbergEffect it would be good if you can provide mockups and notes about desired behavior so that we are on the same page. For example take a look at what I produced for a feature we added recently #166 (comment). |
@RandomlyKnighted For the CLI-based version, we are talking about a multi-step wizard that asks a series of questions. All that info is then gathered and sent to the CLI which uses it to determine how to generate the project. So, it's quite a bit different than what we have today. There are really no templates, but rather code that generates the templates based on choices made. If you want to see it now, you can The wizard is actually not hard-coded but is run via a simple JS workflow engine. It takes in a json doc that describes the steps. I don't know if we'll be able to do that for the VS version or not. It depends on how we integrate the CLI. If we can pipe standard out from our CLI back to the VS dialog...then we can do some crazy stuff. The CLI actually has the UI abstracted, so it could talk directly to a GUI if needed. Currently, it just implements a ConsoleUI. Code is on Github if you want to check it out. It's still early, but there are lots of possibilities. If we can pipe standard out to the VS dialog...we can do some crazy awesome stuff. |
@EisenbergEffect thanks, I just went through the CLI to get an idea what to expect. I think this can be easily done. I'll make the dialog big enough to house all the questions at once so the user can just go through selecting options without having to wait on options to "appear". I also went ahead and took a look at the some of the code. Is this all of the questions that I'll need to add?
If you mean it doesn't do anything after you go through the dialog then yeah I'd say it's slightly broken. haha. Now that I've got it installed just let me know when you've think you've got it fixed I'll be happy to update and test it out for ya.
That's pretty much what I'll be doing here with the WPF dialog. |
@RandomlyKnighted I don't think we'll want to try to display all the options. Those may grow over time and there are some conditional questions based on earlier answers. Probably more of that in the future. What would be neat is if the cli could just push question/options to the WPF window and then have the WPF window push the answers back to the CLI. If we could have a general mechanism then we don't need to embed anything specific in the WPF window and it can work as we continue to update and improve the CLI. I've never tried anything like that before...so I'm not sure how easy that would be to achieve. |
@sayedihashimi could we talk about this in our meeting on Friday? |
@RandomlyKnighted sounds good. |
Fixes #273