hello, it's me.
clearloop / elvis Goto Github PK
View Code? Open in Web Editor NEWYour wasm UI library
Home Page: https://elvisjs.github.io/
License: MIT License
Your wasm UI library
Home Page: https://elvisjs.github.io/
License: MIT License
hello, it's me.
We currently have a platform
module in the core crate, the serde
methods only belong to the target platform, they should not be written in the core crate.
Implement serde
to the widget wrappers of the target platforms, remove this trait, or abstract a new one.
Elvis currently compiles examples into epm
for initializing projects as possible as it could be, but it is...stupid in some way.
The source code is here:
We can use git clone
instead of compiling them.
The WebSocket warp offers is no good, big size and hard to use, wrap an HTTP server and a WebSocket server ourselves next days
The default event listener of wasm-bindgen is hard to use, the code of gloo
is simple, migrate it into elvis-web
.
2020-08-11
Added the SSR system to the development server, and gesture system to our library.
The ElvisJS widget tree is only designed for browser currently, in the previous version, there is a lot of hard code about HTML string in the core crate, now we migrated all of them into the web crate.
We got a chance of cooperating with two artists to write an online gallery for them, crypto art.
The TODO MVC Example
We are considering promoting our library after we completed the TODO MVC example, but ElvisJS is not a real UI library at that time, because we only have few components.
But if we don't promote our library after that, will we miss something?
I think we have to, but ElvisJS is already a big project, cooperating with others or implement an awesome new product by ElvisJS, which should go first?
Need to decide what components we will implement for this first stage, second, and a long term plan...
This router is mainly for the development server, some production usages also.
rustcc is the biggest rust community in China, we can write a client for it in ElvisJS
The old state machine is implemented in the javascript side which we currently suspend developing, need a implementation in the rust source code.
Describe, if any, product changes made this week. Did you add, iterate, or remove product features this week?
We optimize the syntax of our library...again.
What did you accomplish this week?
We've been stuck into the TODO MVC example for two weeks(week-3 && week-4)...maybe it will take the week-5.
We've already completed the UI of the TODO MVC example, the point is, we had figured out a solution to reduced the code used in the example, we reduced half of the rust code, and 2/3 of the CSS output in the TODO MVC example accidentally, it's unbelievable.
We are still working on completing the syntax upgrading, for now.
If everything goes Okay, next week we'll:
launch
means for ElvisJS?This is a very important question for us, due to the type of our product, there are no obvious events for us to check out our status ourselves, pure technical product...I can keep developing it myself day and night months even years, which is not a long term solution.
The Launch
in this summer camp exactly means completing the basic feature of ElvisJS, letting more developers join us instead of keeping developing it ourselves only.
launch
for ElvisJSWe don't have issues/questions currently now, all issues/questions we have we got solutions, we are wondering if there are any questions we've never thought about.
If you haven’t been in the market in any way with your project, why not? What is your approach to finish the next 4 weeks with confidence that you should continue your project or pivot?
We haven’t been in the market with our project because we stuck into the TODO MVC example...
We compared our project to our 'competitors' yew and seed, they cost around 400 lines rust code without their css file, and it will be around 300 lines in ElvisJS including 'CSS'(actually we don't need CSS file).
We've developed a lot of components for ElvisJS during the TODO MVC example which is the goal for 8 weeks, besides the components, we need to:
We composed a set of trait shortcuts for every style, developers can write any trait they want based on them.
This changing likes an add-on customize-able style system of the existing static style widget system, this can reduce lots of code in development.
Comparing to flutter and swiftUI, this is more flexible, comparing to React/Vue, this is more stable.
We are still stuck in the todo-mvc example but completed the syntax upgrading, so we bumped our versions to v0.3.0 as a new launch symbol.
Figured out that something like the todo-mvc example, they can be perfect today, but never tomorrow, it also can be a long term project for checking the syntax or usage of our library.
We tried to make a simple promotion on a developer community of China, V2EX, got 37 more stars on Github, for the status of the goal in this summer camp, 92/100 now, besides, our community(WeChat group) have 44 members now.
We don't have an official website currently now, but we will start to write it next week.
The Elvis Book is updating this night, the challenge of this part is we re-struct our project this 5 weeks, the old book is outdated that can not be updating base on.
Now we've got 92 stars, due to the syntax upgrading, we only simply promoted our project in the week-1 and the week-5, the next promotion is in the week-7, we are pretty optimistic to it.
This is an optional goal, just because we are not sure if we have enough time to complete this in this summer.
There are at least 6000 rust developers are in touch in rust.cc, the website of rust.cc is quite ugly and we will re-write it and find our developers and users from there.
We will figure out if we can complete this optional goal next week.
The exact issue of us is that we don't have enough time to get involved in our project, we make lives through our daily jobs on working days, develop our project on Friday nights and weekends, it is such a common issue which blocks us temporarily.
The solution of this is to find more open source developers to join us, carry on, and make it happen.
What we did last weeks made our library more stable and easy to use, this is a good start, thanks to Mozilla for pushing us!
But this issue might also the advantage of us, most of the big frameworks are developed by few people or big companies which are easy to come into a blind alley, we need more developers because we have to, so let's make ElvisJS become community fruition.
For 10-30 users, we will ask our friends to try out our library.
We are not seeking for 100 users ourselves, because we are not developing an application like project, the way to get more users of us is to find a big user which is the current stage is rust.cc
We currently use HashMap<String, String>
for styles, which is very ugly, should move them into enums, like the gesture
enum.
It seems broken, maybe we can add git clone
instead of compile
the hello world in source together in the pr.
We'll update the book using ElvisJS in the future, so we need a markdown plugin writing in ElvisJS, a standalone repo or inside the current repo.
The wasm bundle currently has not been optimized in the compiling process in elvis-backend
, need to optimize the output size.
Add this wasm-opt function to
I prefer to import the wasm-opt
library directly for myself, downloading the binary seems verbose.
2020-08-11
Add chain style syntax to widgets instead of struct style.
We didn't accomplish the goal we set up last week, but we've got great progress in our project, the struct of widgets and styles are all in order now, developing components comes really easy.
Launch version 0.3.0
No
The current components transformation is based on HTML string, this limits the cross-platform
feature of Elvis.
It's kind like the arch of substrate, but it will make the high-level API more elegant and easier to use, and the cross-platform feature will be easier to implement by this.
Keep trying advanced trait
We accomplished the Event Listener part of our Project.
This is absolutely the core module of our project, things come easier after this, and we can develop a TODO MVC example the week after next, things work just like we planned, no surprise, this is not good.
We didn't promote our project this week, 1 more member in our WeChat group and 1 more Github star(now is 55 stars), but we are thinking about this, in the week-3, there must be some solutions.
Time shortage as all of our teammates have daily jobs, I just moved to the city our teammates located in, lots of moving house stuff and troubles on my work, but all of them are finished now.
Simplify the code of our project, lots of historical verbose code after this week's pushing.
Most of them are technical, they have been listed in our Github issues.
We know one of the features of Open Lab is founders and authors can communicate with others on this platform
, an embarrassing problem is...we as Chinese who never been aboard, our English sucks, it's hard for us to communicate with English speakers, but anyway, this will not slow our steps.
How can we promote our project efficiently? Our features:
We are considering:
Elvisjs
Web assembly UI Library for web pages
The TODO MVC is our north star for now(in the week-3).
All we need to do is developing more products based on our project as examples, but what should we do after the TODO MVC? Even we have a plan implementing all components in the Material design, we know that is not the real north star, we have to sell this project to some big companies.
Ideal Products:
We should develop an awesome product based on this project as well, we already have this idea years before, and Elvisjs is just for that project original speaking —— A programmable Blog System for people who don't know how to program, but generally speaking, that is the project after the development of Elvisjs in our timeline, we don't want to think or talk about it too much currently now.
But whatever, the rise of Elvisjs is written.
Elvis is extremely basic for now, add more useful features for developers
To implement the examples above, Elvis needs to add:
The root README makes something mixed up for now.
The current code we have is not friendly for developers, people need a UI template while they developing elvis components.
The state machine doesn't work...It's buggy to pass complex data to wasm, we need to use Closure
instead of Fn
, ref gesture.rs
The syntax of the state machine is hard to use, need to refactor as below
struct Hello {
name: String,
}
impl LifeCyle for Hello {
fn create(name: String) -> Self {
Self { name }
}
fn render(&self) -> Center {
Center::with(Text::with(&format!("Hello, {}", self.name)))
}
}
struct Counter {
count: i32,
}
impl LifeCyle for Counter {
fn create(count: i32) -> Self {
Self { count }
}
fn render(&self) -> GestureDetector {
GestureDetector::new(
Text::with(format!("count: {}", &self.count)),
).register(Gesture::Tap, |&mut state| state.count += 1)
}
}
Since we are in the first week of the program, what is your plan to hit the ground running this week and put yourself in the best possible position to succeed over the next 8 weeks?
The first week is just like the weeks before or after it for us, to let other developers in, we have to keep developing the core part of Elvisjs, and we'll do some promotion jobs aside from now on.
The initial works will take about 2 weeks.
We currently don't want to think or plan too much about the weeks after this first two, because we have already done it on our basic resume, and recorded it as issues in our Github repo, so, let's start it.
We just introduced this project to the rust community of China last week, got about more 30 stars on GitHub, and created a community in WeChat(An IM App in China) which has 36 members who are interested in our project for now.
A front-end developer of the community of Elvisjs wants to join us, we are planning to sync the concepts to him this weekend.
Here is a documentation plan about introducing the arch of Elvisjs, for developers, for users, and for someone just interests in this project, we just need to complete the doc before doing something more about the promotion.
Besides, we set up a blog for week reports last week.
First of all, we have to make the core module stable before others joining our community or trying our library, otherwise, we are achieving nothing.
To make the core module stable, here are 4 things left:
After completing this, it will be easier to let others join this project, and the coding works will focus on the common UI components at that time.
There is no best possible position for us, we are in the best possible position all the time.
It's hard to say...we took a break and did nothing this week.
Besides, we cooperated with two designers and made an artwork this week, https://clearloop.github.io/eleland/genesis/grid/ cells of the web, and the SVG
operating will migrate into ElvisJS after this artwork is done.
Updated the style trait usage of ElvisJS and wrote an official website last week which week we forget to submit our status.
About the client of rust.cc, we just delay it, because we always have the chance of it, but the artwork not.
We will keep completing the artwork mentioned in overall status, and repair the state machine of ElvisJS next week.
We still don't have issues/questions, and we're quitting the competition for the final prize because we really don't have enough time to chase it currently now, and it doesn't matter, we have already got what we need from the Open Lab, thank you all.
But we'll keep submitting the status reports, it's kind of an appropriate encouragement for us. Hope we can join the Mozilla Builders Program next year, as full-time builders.
Rust doesn't support optional arguments like javascript, the syntax of style is too verbose, for example:
impl Default for TextStyle {
fn default() -> TextStyle {
TextStyle {
bold: true,
color: Colors::Pink,
italic: true,
size: Unit::Rem(2.0),
weight: Unit::None(400.0),
height: Unit::Rem(1.0),
stretch: Unit::Percent(100.0),
}
}
}
We need a syntax of chain setting styles like:
let style = TextStyle::new().bold(true);
Let talk about what will we ship in 8 weeks? How does it follow through on the promise of fixing the internet?
The core library abstracts UI structure out of any platform, it is the UI design in pure code which representing the vision we can see from our eyes. The UI of web, native, and desktop will build from this.
If Elvis's basic library is not stable, developers will not join in, because the logic of the current code is hard to contribute, and people won't know what we are doing and what we will achieve.
How developers use our library? How to let them know what they can build through Elvis? So we need some examples to show the usages of our library.
APP | Spec |
---|---|
Hello World | Try Elvis for the first time |
Counter | Show the usage of state machine and Event listener |
Router | Show the usage of Router |
TODO MVC | Show the perform of Elvis |
Blog Template | Reach real users |
This is the core part of this 8 weeks, we need to compose a lot of components to achieve our goal —— Making UI development as easy as it should be.
A basic structure of an APP includes:
We will build at least full of the first three categories of the list above in pure rust and wasm.
If we have enough time, we will rewrite rustcc.cn also, because it is the largest rust community in China, we need the help of rust developers, and they are actually who will use our library as the first users.
We will fix the verbose web development workflow which is controlled by the javascript system before.
The javascript developing system is buggy, package managing, environment configuring, dynamic languages, weird syntax...Common people need a better choice to reach the internet, join the internet, express their ideas freely as in freedom, not be limited by the ideas of others, just because programming or implementing their own ideas is too hard.
Though rust code is difficult to learn in some way, but we will make the syntax of Elvis as easy as it could be for developers, people don't need writing Javascript, HTML, and CSS in future, except newbies, lots of experienced developers can't implement their ideas immediately just because they can't stand the current web things above, these are what we want and what we will fix finally.
websocket err, send message failed :Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
Just run epm dev
under the directory of your elvis APP, modify your code.
ElvisJS is as a stable stage now, we need to update the book.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.