jackblog-vue
Jackblog vue 版, 个人博客系统, 使用 vue2, vuex, vue-resource, vue-router, vee-validate, vue-toast 等.
Top Related Projects
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
The library for web and native user interfaces.
Deliver web apps with confidence 🚀
web development for the rest of us
The Intuitive Vue Framework.
The best React-based framework with performance, scalability and security built in.
Quick Overview
Jackblog-vue is a single-page application (SPA) blog built using Vue.js. It serves as a frontend implementation of the Jackblog project, which is a full-stack blog system. This repository focuses on the Vue.js frontend, providing a modern and responsive user interface for the blog.
Pros
- Built with Vue.js, offering a reactive and component-based architecture
- Implements Vue Router for seamless navigation between blog pages
- Utilizes Vuex for state management, ensuring efficient data flow
- Responsive design, suitable for various screen sizes and devices
Cons
- Limited documentation, which may make it challenging for new contributors
- Dependency on a separate backend API, requiring additional setup
- Relatively old project (last updated in 2017), potentially using outdated dependencies
- Lack of recent updates or maintenance, which could lead to compatibility issues with newer Vue.js versions
Getting Started
To get started with jackblog-vue:
-
Clone the repository:
git clone https://github.com/hutuxuhui/jackblog-vue.git
-
Install dependencies:
cd jackblog-vue npm install
-
Configure the API endpoint in
src/api/resources.js
:export const API_ROOT = (process.env.NODE_ENV === 'production') ? 'https://api.jackhu.top/' : 'http://localhost:3000/'
-
Run the development server:
npm run dev
-
Build for production:
npm run build
Note: Ensure you have the backend API running and properly configured before starting the frontend application.
Competitor Comparisons
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
Pros of Vue
- Larger community and more extensive documentation
- More comprehensive framework with built-in routing and state management
- Higher performance and better scalability for large applications
Cons of Vue
- Steeper learning curve for beginners
- More complex setup and configuration for small projects
- Potentially overkill for simple applications or prototypes
Code Comparison
Vue (from Vue):
import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')
Jackblog-vue (from jackblog-vue):
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
The Vue example shows a more modern and concise approach using the Composition API, while jackblog-vue uses the older Vue 2 syntax with explicit router and store imports. Vue's approach is more streamlined and easier to maintain for larger projects.
Vue is a full-fledged framework suitable for building complex applications, offering better performance and scalability. Jackblog-vue, being a blog application, is more focused and potentially easier to set up for specific use cases. However, it may lack the flexibility and extensive ecosystem that Vue provides for diverse project requirements.
The library for web and native user interfaces.
Pros of React
- Massive ecosystem and community support
- Extensive documentation and learning resources
- Backed by Facebook, ensuring long-term maintenance and updates
Cons of React
- Steeper learning curve for beginners
- Requires additional libraries for full-featured applications
- More complex setup and configuration compared to Jackblog-vue
Code Comparison
React component example:
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}
const element = <Welcome name="Sara" />;
Jackblog-vue component example:
<template>
<h1>Hello, {{ name }}</h1>
</template>
<script>
export default {
props: ['name']
}
</script>
React focuses on a JavaScript-centric approach, while Jackblog-vue uses a more template-based structure. React's JSX syntax allows for more flexibility in component composition, but Jackblog-vue's single-file components offer a cleaner separation of concerns.
React's extensive ecosystem provides more tools and libraries for complex applications, while Jackblog-vue offers a simpler, more opinionated structure suitable for smaller projects or quick prototyping.
Overall, React is better suited for large-scale applications with complex state management, while Jackblog-vue may be more appropriate for smaller projects or developers who prefer a more straightforward Vue.js-based approach.
Deliver web apps with confidence 🚀
Pros of Angular
- Comprehensive framework with built-in features for large-scale applications
- Strong TypeScript support and tooling ecosystem
- Extensive documentation and community resources
Cons of Angular
- Steeper learning curve compared to Vue.js
- More verbose and complex for smaller projects
- Potentially slower performance due to its size and complexity
Code Comparison
Angular (component example):
@Component({
selector: 'app-root',
template: `
<h1>{{title}}</h1>
<button (click)="onClick()">Click me</button>
`
})
export class AppComponent {
title = 'My Angular App';
onClick() { console.log('Button clicked!'); }
}
Jackblog-vue (component example):
<template>
<div>
<h1>{{ title }}</h1>
<button @click="onClick">Click me</button>
</div>
</template>
<script>
export default {
data() { return { title: 'My Vue App' } },
methods: { onClick() { console.log('Button clicked!') } }
}
</script>
Angular offers a more structured approach with decorators and TypeScript, while Jackblog-vue uses Vue.js's simpler template and script structure. Angular's syntax is more verbose but provides stronger typing, whereas Vue.js focuses on simplicity and ease of use for smaller to medium-sized projects.
web development for the rest of us
Pros of Svelte
- More active development with frequent updates and a larger community
- Compiler-based approach leads to smaller bundle sizes and better performance
- Comprehensive documentation and learning resources
Cons of Svelte
- Steeper learning curve for developers familiar with traditional frameworks
- Fewer third-party libraries and components compared to Vue ecosystem
Code Comparison
Svelte component:
<script>
let count = 0;
function increment() {
count += 1;
}
</script>
<button on:click={increment}>
Clicks: {count}
</button>
Jackblog-vue component:
<template>
<button @click="increment">
Clicks: {{ count }}
</button>
</template>
<script>
export default {
data() {
return { count: 0 };
},
methods: {
increment() {
this.count++;
}
}
};
</script>
Svelte's syntax is more concise, with less boilerplate code compared to Vue. The reactive declarations in Svelte are simpler, as they don't require a separate data object or method definitions. However, Vue's template syntax may be more familiar to developers coming from other frameworks.
The Intuitive Vue Framework.
Pros of Nuxt
- Larger, more active community with frequent updates and extensive documentation
- Built-in server-side rendering and static site generation capabilities
- More comprehensive framework with additional features like automatic code splitting
Cons of Nuxt
- Steeper learning curve due to its extensive feature set
- Potentially heavier and more complex for simple projects
- May introduce unnecessary overhead for small-scale applications
Code Comparison
Nuxt (pages/index.vue):
<template>
<div>
<h1>{{ title }}</h1>
<p>{{ description }}</p>
</div>
</template>
<script>
export default {
data() {
return {
title: 'Welcome to Nuxt',
description: 'A Vue.js framework'
}
}
}
</script>
Jackblog-vue (src/components/Home.vue):
<template>
<div class="home">
<h1>{{ msg }}</h1>
</div>
</template>
<script>
export default {
name: 'Home',
data () {
return {
msg: 'Welcome to Jackblog'
}
}
}
</script>
Summary
Nuxt offers a more comprehensive framework with built-in server-side rendering and static site generation, making it suitable for larger projects. However, it may be overkill for simpler applications. Jackblog-vue, being a smaller project, might be more straightforward for basic blog implementations but lacks the advanced features and extensive community support of Nuxt.
The best React-based framework with performance, scalability and security built in.
Pros of Gatsby
- More robust and feature-rich static site generator with a larger ecosystem
- Better performance optimization and built-in progressive web app capabilities
- Extensive plugin system for easy integration of various functionalities
Cons of Gatsby
- Steeper learning curve due to its complexity and reliance on GraphQL
- Potentially slower build times for large sites compared to simpler Vue-based solutions
- Heavier initial setup and configuration required
Code Comparison
Jackblog-vue (Vue.js component):
<template>
<div class="article-list">
<article v-for="article in articles" :key="article.id">
<h2>{{ article.title }}</h2>
<p>{{ article.excerpt }}</p>
</article>
</div>
</template>
Gatsby (React component):
import React from "react"
import { graphql } from "gatsby"
const ArticleList = ({ data }) => (
<div className="article-list">
{data.allMarkdownRemark.edges.map(({ node }) => (
<article key={node.id}>
<h2>{node.frontmatter.title}</h2>
<p>{node.excerpt}</p>
</article>
))}
</div>
)
export const query = graphql`
query ArticleListQuery {
allMarkdownRemark {
edges {
node {
id
frontmatter {
title
}
excerpt
}
}
}
}
`
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Jackblog Vue ç
Jackblog æ¯ä½¿ç¨ Node.js + MongoDB + å
¶å®å®¢æ·ç«¯æ¡æ¶å¼åç个人å客系ç»,åå端å离,仿ç®ä¹¦æ¨¡æ¿.
æå¡ç«¯æ: express ç , koa ç
客æ·ç«¯æ: angular1.x ç , angular2.x ç , react ç , vue ç
ç§»å¨ç«¯æ: react native ç, ionic2.0 ç
æ¤ä¸ºå®¢æ·ç«¯vueç, éè¦é åæå¡ç«¯ä½¿ç¨.
æå¡ç«¯ä»»éä¸ç§, 请é¢å å®è£ å¹¶å¯å¨æå¡ç«¯
å¼å
$ git clone git@github.com:jackhutu/jackblog-vue.git
$ cd jackblog-vue
$ npm install
$ npm run dev
卿µè§å¨ä¸èªå¨æå¼ http://localhost:3000
è°è¯
- é»è®¤å¼å¯ vue-devtools chromeæµè§å¨æ©å±, ç产ç¯å¢èªå¨å ³é
ç®å½ç»æ
.
âââ README.md
âââ dist // 项ç®buildç®å½
âââ logs // ç产ç¯å¢æ¥å¿ç®å½
âââ src // ç产ç®å½
â âââ api // API 请æ±
â âââ assets // css åå¾çèµæº
â âââ components // ç»ä»¶
â âââ utils // å·¥å
·å½æ°
â âââ store // vuexç¸å
³æä»¶, store,action
â âââ config.js // api url, cookie domainçé
ç½®æä»¶
â âââ index.html // 主页html
â âââ routes.js // è·¯ç±é
ç½®
â âââ index.js // å
¥å£æä»¶
âââ .babelrc // babelé
ç½®
âââ .eslintrc.json // eslinté
ç½®
âââ History.md // æ´æ°æ¥å¿
âââ process.json // pm2é
ç½®æä»¶
âââ server.js // ç产ç¯å¢å¯å¨server
âââ webpack.config.js // Webpack é
ç½®æä»¶
ç产ç¯å¢æå»º
$ npm run build
线ä¸å¸ç½²
$ pm2 start process.json
License
MIT
Top Related Projects
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
The library for web and native user interfaces.
Deliver web apps with confidence 🚀
web development for the rest of us
The Intuitive Vue Framework.
The best React-based framework with performance, scalability and security built in.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot