Skip to content
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

Migration to Vue 2.0 #6

Open
fizerkhan opened this issue Dec 16, 2016 · 15 comments
Open

Migration to Vue 2.0 #6

fizerkhan opened this issue Dec 16, 2016 · 15 comments

Comments

@fizerkhan
Copy link

Is there any plan to migrate a Vue 1.x app to 2.0?

@Ma63d
Copy link
Owner

Ma63d commented Dec 16, 2016

Recently I'm working on another Vue 2.0 project: leetcode-viewer. If you just need an Vue 2.0 example, leetcode-viewer and the demo may be a candidate.
In view of the current works, it seems that it's not difficult to use Vue 2.0. So surely I will migrate this project to 2.0.
But sorry to tell you that the migration won't be done recently for time reason.
The deadline of my master paper makes me mad. 😭 😭

@fizerkhan
Copy link
Author

fizerkhan commented Dec 16, 2016

@Ma63d Thanks for the quick update. I understood your priorities. I will take a loot at leetcode-viewer

One small suggestion: If you have simple login management, it could not very useful in the current project.

@Ma63d
Copy link
Owner

Ma63d commented Dec 16, 2016

@fizerkhan could not very useful?

@fizerkhan
Copy link
Author

fizerkhan commented Dec 16, 2016

@Ma63d We are thinking to use this project for our internal docs, it will great if we have signup options. So everyone can login and update docs. Also if there is any support for english, that will be awesome.

@fizerkhan
Copy link
Author

fizerkhan commented Dec 16, 2016

@Ma63d If you take this project in the direction of knowledge base docs instead of just blogs, that will be awesome since there are not much better knowledge base open source projects. But we have too many static blog tools.

@Ma63d
Copy link
Owner

Ma63d commented Dec 16, 2016

I understand your needs. But the blog is created just for personal presentation. If I upgrade it to an multi-user blog, the total blog need to be fully changed and recreated, including the table of database, the backend logic and UI.

I've designed some functions based on my previous experience in writing blog posts to make the blog more conveniently used. For example, this blog admin is like a note app, which means you can write a note and whenever you think the content has substantial content and depth, publish it. So as far as i am concerned, the blog is convenient.
If I change it to knowledge base docs, some functions must be off and the blog will get more difficult to use than now.

There are a lot of open-source multi-user blog projects, such as b2evolution, LifeType.More generic, wordpress, duraple both meet your need. And this one: koa blog.
By the way, I think confluence is the best one for your internal docs and team collaboration.

@fizerkhan
Copy link
Author

@Ma63d Yes you are correct. I agree with you. I also really love the concept of writing my blog just like a note. I might be wrong because I was thinking that it will be useful for other support docs purpose too.

Okay. Now lets focus on migration alone.

@jsm1003
Copy link

jsm1003 commented Dec 21, 2016

@fizerkhan I recently wrote a multi-user blog based on vue2.1, https://github.com/ZinCode/vue-ssr-blog-client
Currently the project is still under development, you can focus on this project, a few days later this project will be on the line,forgive me poor English level

@fizerkhan
Copy link
Author

@ZinCode Thanks. For me too, English is the second language. Unfortunately I don't know Mandarin. However I will take a look at it.

@Hellowor1d
Copy link

BTW , Is there any plan to migrate a Koa 1.x app to 2.0?
Wish all the best for your master paper @Ma63d

@Ma63d
Copy link
Owner

Ma63d commented Apr 19, 2017

Thx @Hellowor1d .
Migration of Koa 2.x is important but not difficult. The next version will both upgrade Vue, koa and use SSR.

@sfyr111
Copy link

sfyr111 commented Jun 21, 2017

^^厉害了老铁,先star了,等你升级完毕,期待能给出攻略

@Ma63d
Copy link
Owner

Ma63d commented Jun 21, 2017

@sfyr111 已经在抽空升级了,可以查看 v2 分支。server 端改动了一下,升级了 koa v2, 重新设计了一下代码逻辑,加入了评论功能,封装了 schema 层和加入了切面编程。前端也还在改。admin 部分的 vue v2改造还没完成。最近入职新的实习公司,忙成猪头,最近怕是没时间再改了,只能后续再加油。

目前的升级计划如下:

  • 升级 vue 全家桶至2.x版本
  • 升级 koa 至2.x版本
  • 升级 webpack 至2.x版本
  • 增加服务器端渲染( SSR )
  • 增加 PWA , 主要是推送功能与启动页
  • 自己手动实现评论功能,去掉了多说
  • 样式小幅更改
  • 将1.x版本中考虑的 [隐藏已发布文章] 功能完成
  • 增加打包完成后的 CDN 上传配置
  • 上HTTPS
  • 可能 基于七牛云 API 实现图片粘贴上传功能, 极简图床这次更新是在太傻逼, 不想用了, 有余力就自己搞粘贴上传

@jixianu
Copy link

jixianu commented Jun 29, 2017

token登录这我看你的代码,有个问题:
就是token在后台路由中写了一个router.get('/tokens/check',mw.verify_token,check); 这段代码没有看懂,作用是?验证token不是在前台请求头中,发到后台了么,这个是不是调试时拉下的?要不就是有作用没有看明白

@Ma63d
Copy link
Owner

Ma63d commented Jun 30, 2017

@jixianu check 是单纯用来测试 [带了 token 的话是否能通过外部 mw.verify_token 的检查正确抵达业务逻辑],确实是单纯 debug 用的,因为上线之后也依然用这个接口进行测试了一下。所以就在 master 分支里保留了。最近升级 v2 分支时已经干掉了。

建议不要看 master 分支的代码,最开始写的时候,写的很急,几乎所有的逻辑都在 controller 层,model 层实则只是个输出 ORM 的摆设。业务报错、校验等逻辑都没有切分。controller层又重又乱。 v2 分支改善了这些问题。

但是 v2 分支最近只是改完了 server 部分和 一些 admin 部分,暂时停滞着。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants