Can I get by without adding Vetur to my Vue.js 3 Apps? - vue.js

I'm using Visual Studio Code to develop Vue.js 3 apps. In my early learning on vuemastery.com it was instructed to use Vetur, but I'm finding that Vetur is too much of a hassle to get it working, and it's consuming a lot of time. The Vetur documentation is just "tossed salad" and doesn't target specific issues; it needs a lot of editing, too. Can I get by without Vetur?
Vetur can't find tsconfig etc.
Cannot find module '../assets/ etc.

In terms of necessity, nothing obliges you to use it it just helps with for example definition jumping and completion in some cases.
As stated in some comments, its main purpose it to ease development and if doesn't do that for you no need to have it. I would still recommend setting some time aside so you can figure it out and try and having it running :D

Related

Is it possible to use different framework library just for one component?

I'm using Vuetify Vue3 for a project. There are some components missing that are available in other fw. Does this cause messup in the project by installing extra fw for one component?
You can indeed have several frameworks at the same time, but it may drastically impact your performance and lead to messy code because of the difference in APIs.
If you are meaning, CSS like a UI framework (Vuetify, Bulma, Bootstrap etc...), the answer is the same. Doable but quite heavy.
Nothing stopping you from going crazy by using all of them!
Technically, you can use at the same time, but if you mean CSS frameworks sometimes it can lead to conflict between classes.
It is not recommended and best practice to do that because it can cause a conflict and also can make your application heavy.
But it is not forbidden and you are free to try.

What is the most up-to-date recommended seed/setup for latest riot version (3.11)?

What is the most elegant way to get a riot based UI today?
i'd love the following points to be addressed:
A proper code-mapping for easy debugging
A good way to bundle the application (so far i used Webpack and JSPM)
It would be lovely if it would work elegantly with Typescript.
Is it best to use Tag files, or straight JS? If the later, would it be better to use a class that inherit from riot's tag class? If so, can i place the template code in a different file?
Future compatibility: i saw that there's going to be a change (that "export default" thing) - how would you recommend to write the code for the smoothest migration path?
If you have more items for consideration - please add them....
Thanks for asking these questions. I have tried to answer to all your questions hoping they could be useful also to other Riot.js users
A proper code-mapping for easy debugging
the riot compiler generates simply javascript code without modifying too much the structure of your original source code. Any modern browser should be able to provide with debugger breakpoints and console calls all the debugging tools you need. Check for example the stack trace of this error you don't need much more to figure out where it's coming from.
A good way to bundle the application (so far i used Webpack and JSPM)
In this repo we provide 3 different javascript bundle examples: rollup, webpack, riot-compiler. I personally prefer rollup but you can (and should) use whatever works best for you and your team.
It would be lovely if it would work elegantly with Typescript.
The riot public methods are already available as Typescript interfaces:
- https://www.npmjs.com/package/#types/riot
- https://www.npmjs.com/package/#types/riot-route
I am not a typescript user and that's why I will not invest time in making examples in a technology I don't use but PR are welcome
Is it best to use Tag files, or straight JS? If the later, would it be better to use a class that inherit from riot's tag class? If so, can i place the template code in a different file?
I recommend you to just use Tag files because riot was designed as component library and it embraces completely the philosophy of components composition vs class inheritance. If you have code you share across several components you can either use mixins or import it with your bundler directly in your tags see for example
Future compatibility: i saw that there's going to be a change (that "export default" thing) - how would you recommend to write the code for the smoothest migration path?
Riot 3 will be not compatible with Riot 4. (that will be a full rewrite) I can't recommend any best practice to make your code portable to Riot 4. Remember that Riot 3 will be still supported and your code will run even on IE9 for the next 10 years. Once riot 4 will be released and the API will be stable I can provide more hints about a migration path.

Should I use workflow in my module development?

Should I use workflow in my module development? I feel like it complicates things and make the development itself prone to errors. Does the benefit really outweigh the hassle I need to go through to implement workflow? Instead of just using actions and buttons?
As long as I know, workflows are going to disappear in following versions of Odoo, instead of them there are going to be only buttons calling methods which will modify the status of the object.
I have just modified a workflow in a custom module. This module was made to work only in version 8, and I have overwritten the workflow. If I wanted the module to be moved to version 9 and more, may be I would have used only buttons and methods as you have written.
I guess you can do it in both ways, depending on whether you are in a hurry or not.

How to practice HAML and SASS (environment)

Could you please give me advice how its better to practice HAML and SASS.
I`ve downloaded and installed everything for windows and i can compile files and use it via command line. But still i want to be able to code and browse it at once, not writing anything in command line.
I mean what shall i do on my localhost to use it? Am i to use with any kind of engine, Drupal for example. Or is there a more simple way?
Thanks in advance!
I have recently discovered a free online SASS/SCSS-HAML editor, named Voyage, developed by Zhi-Qiang Lei (thanks!). Very useful for beginners to practice, and for everyone to test snippets quickly.
http://voyage-editor.herokuapp.com/
Hope it helps
Ok so, for Sass and Compass, you can always use the --watch flag to watch the modified files and recompile them on the go.
Now I reckon this doesn't account for HAML wich doesn't have a --watch flag, or other languages such as CoffeeScript etc. The best solution for the moment for a stable and easy to work with environment is to use an external software that will do the command line work for you.
There are several out there, I've tried out a few of them — depending on your current platform and how much you want to put in (from 0$ to 9$). I don't know a lot of free preprocessors manager so if people want to go and comment with free alternatives I'd be glad.
The best in my humble opinion is LiveReload because it's what I've tested to be the most permissive in your organization, it compiles fast, reloads your browser on change, etc.
Cons are it's best to use it on a Mac, considering the Windows version is still in beta and far from finished. But if you're on a Mac, to me it's definitely the way to go.
You can use FireApp too, it does the same job but it's a little less permissive. There are things you can't do with your Compass configuration files, folders you have to name a certain way, etc. It's also paying, but it's cross-plateform (coded in JRuby).
On the free side of life, you currently have CodeKit for Mac but it's free only during the beta and will become paying. On the other hand it's really worth it's money for how well executed it is and it will really make your life simpler.
You can probably go look on the internet for similar softwares, but you get the idea. Currently the best way to have an easy to use work environment while avoiding the command line is to go through those kinds of softwares.

Switching from ExtJS3 to ExtJS4: Worth the hassle?

We are in the middle of a relatively large project which uses ExtJS3 and have already invested ~4 man-years, using several plugins and we have written some plugins ourselfs. After a quick glance at ExtJS4, it seems that we would have a lot of work to do to migrate the project to ExtJS4. Are there any strong reasons to switch to ExtJS4? Currently, it seems to me that compatibility with future browsers (or the lack thereof) is the only one.
We're in similar situation and our conclusion was to wait a bit more as Ext 3 is doing it's job. We experienced many problems in our "test" migration and I would say that it's more a rewrite of the application than a migration :(. Also, our experience showed that Ext JS 4 has some performance problems, forms are a bit different, store cannot reject changes, it's bigger. There are some very good new features like the new class system, mixins, new charts, ...
We have upgraded our application to ExtJS4 without fail.We are happy to say that ExtJS4 is fast compare to ExtJS3.A new class system,mixins,plugin-free charts,focus management...etc.,. But if you want to upgrade you need to change a lot of code because class system and config options are changed.We have tested the performance of our application using ExtJS3 and ExtJS4,so as per our observation ExtJS4 is fast and it will not break.As per our observation,CSS selectors are also changed if you want to customize the component you can easily do the thing in ExtJS4.
We tried to migrate from ExtJS3 to ExtJS4 previous week. Unfortunately I must say it is like translate english to german. A lot of work. From our point of view more or less just the charting system is plus, minus - a lot of components that we use are not supported, a lot of css customization shoud be done, working code in ExtJS3 breaks easily and there is sometimes almost impossible to find an error.
Not an expert but personally I'd start new project with extjs4 but leave exiting project alone. The charting stuff is amazing in 4!