WoW addon with modern language and design patterns
Hello everyone,
I am currently developing a transpiler that allows to convert the language Typescript into a WoW compatiable LUA (@wartoshika/qhun-transpiler). With a powerfull transpiler in my back, i started developing a modern framework as a base for other developers and as a starting point to take a look at existing source code (@wartoshika/wow-QhunCoreTS). There is currently no existing complete documentation because i am still in the heavy developement phase. I will add them when both projects become stable released. My questions are now related to both of the projects.
I can provide example files or a gist with generated LUA source code if you like. My daily business is the full stack development of web applications. Those things are everywhere in this environment. But this may not be the case for addon developing in an environment that is not my daily business. I appreciate every comment or thought of yours. One goal of this is to gain a base knowledge of this community of developers and if my idea can fit into this place. Regards wartoshika |
We've seen many frameworks created but not many are in active use. Putting a framework into another language with restrictions not in Lua does not sound too tempting to try it. If you enjoy it have fun.
When it comes to addons it shows that the smaller the better and the longer they will work once the authors stop supporting them. |
Thanks for your answer.
I will keep in mind that developers needs a way to shrink complex constructs into maintainable source code. This should keep the required work for updates small and the support time longer. Great point Rilgamon! |
Since the Lua is a language with the least grammar, it may not attract the addon authors with Lua experiences, but it may attract authors from the web development.
With my exp, unlike web apps, the addons are smaller and more simple. With libs, the authors should focused on the functions not the class structure. I failed for my first lib because it's too complex to be learned and started a new one - Scorpio A new addon framework, it's designed to hide the details of the OOP system and allow authors create addons with only functions.(you may find a complex OOP system is not always welcome in that thread:D) Also with the nodejs, if you can provide a WYSIWYG IDE, It may be a most attractive project for the wow addon authors. |
Procedural written addons will gain a huge complexity when writing more and more lines of code. Authors must be very skilled in order lower cognitive complexity and keep maintainability.
I unterstand your point kurapica.igas. In my opinion a WYSIWYG editor is targeted to users with below average skill in programming/scripting. Such software will be very complex to write and unterstand if i want support window anchoring, dynamic inheriting of parent frames, user defined properties... (But i will keep this idea in mind for UI creation). I may overthink my target group of people using this framework / transpiler. It's current cognitive complexity is low when you allready know standards of web development and OOP system but high if you dont. Wish you best of luck for your Scorpio framework :) |
I am starting to write the documentation for the current stage of development. This can be found here.
This documentation is targetted to developers that understands the basic programming context. They do not know that Typescript or Node.js is. This may improve the acceptance of non web developers who are interested in writing addons in a more modern way. I have decided to target people who want to write more complex addons. Small addons should be either transpiled without this framework, or should keep the LUA context. This decision reduces the amount of people that may want to use this tools, but as a developer with OOP in heart i can not simplify it to a LUA only context. QhunCore has been my test framework with LUA base. In my opinion there is to much boilerplate code nessesary to accomplish a mid to large addon with a good maintainability. Still I appreciate every comment/thought to alter the framework to improve the acceptance more. |
OOP constructs are built into the utilities in the UI code, and are heavily used in modern UI code. As someone who maintains a project with more than 30k lines of code, I just want to say I wouldn't use this. It's introducing a lot of constraints that Lua doesn't have natively. Lua's quirks and dynamic typing are sometimes useful to solve certain problems.
I understand where you're coming from, though. A lot of my older code is rather bad, and could've benefited massively from writing templates to inherit from, rather than building from scratch for somewhat similar scenarios. A novice programmer is also likely to introduce bugs due to dynamic typing. If you're committed to finishing this project out of passion, by all means go ahead. Just don't expect it to be a popular way to write addons. |
I dont want any kind of revolution, i would just be happy if there are some developers out there who benifit from this. And if there arent any, i can still use it for myself :)
There is still a lot of work todo, especially in documenting the wow api to be available via autocomplete. When i release the first stable version, i can look at the acceptance criterias in order to improve the usability. Thanks for your reply MunkDev, every thought helps to understand the core developers of the addon community. My commitment to finish this project is still there! More than this, i have more ideas that needs a solid transpiler and framework base to work. This idea will mock the ingame api and allow unit testing the latest api from within your IDE. If this project ist just a way of passing the time, it is a good way in my opinion ;) |
Quote:
|
Minor quibble, but since you need to document... Lua is the name, it is Portuguese for "Moon", and it is not an acronym, meaning it is not LUA.
Not related to your project, but it is just like the development library is Ace3, not ACE3. It doesn't stand for anything, it is just a name. |
@tonyis3l33t:
The current stage of documenting the API is public visible via its GitHub repository and via nodejs (@wartoshika/wow-declarations). This is a Typescript specific documentation type allowing to use it for autocompletion and method based documentation in the IDE. Together with the transpiler and the framework it should be a solid base. Since a developer need low latency when autocompleting a function, where is no time to query the existing API on gamepedia.com. I prefer to mirror the existing documentation and update missing information on gamepedia.com by hand. Since the online documentation is in verry different formats, i cannot write a parser that can automaticly pick up the correct function arguments and types. But a public available repository on GitHub is a good base to share improvements that can be merged into gamepedia.com. An other advantage on mirroring it to TypeScript declaration files is that every IDE can use the autocomplete and documentation data, no plugin is needed for a specific IDE. @myrroddin: I will keep this in mind when completing the documentation to use the name Lua correctly. Thanks for this information :) |
Quote:
|
2 Attachment(s)
I see your point. When talking about Lua this is a good dev tool.
Since my target is TypeScript i need to add some more declarations. Like having an object of type eg. WowFrame. See this picture of the qhun-core-ts framework in Visual Studio Code. And the declarations of the API will work in every IDE that understands TypeScript (there are a lot). |
Quote:
I have recently switched from Sublime Text 3 to Visual Studio Code and I am missing your wow development package :( |
Quote:
|
I wonder if you have seen this project already?
https://github.com/wowts There is a TypeScript-to-Lua transpiler as well as a Lua-to-TypeScript transpiler under that project umbrella. It is currently in use to develop the Ovale WoW addon. |
2 Attachment(s)
wartoshika
I would be intereseted sharing parametered global API methods with you. I have a lot of ready to go but also lots of missing ones. |
@Resike:
These are 7.0.1+ functions. When i come to this stage of documenting them, i'll let you know (WoWInterface or GitHub). @jlam: Quote:
I want decorators, bitops, complex type transpiling, JavaScript function support when transpiling, type reflection for eg. dependency injection. |
All times are GMT -6. The time now is 02:57 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI