GithubHelp home page GithubHelp logo

ihuoxin / awtk-patterns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zlgopen/awtk-patterns

0.0 0.0 0.0 5.85 MB

以一个简单计算器为例,展示传统、MVC、MVP和MVVM几种模式在AWTK上的实现方法。

License: GNU Lesser General Public License v3.0

Python 8.46% C 84.57% Shell 0.45% C++ 6.53%

awtk-patterns's Introduction

awtk-patterns

用一个简单计算器为例,展示传统、MVC、MVP和MVVM几种模式在AWTK上的实现方法。

准备

1.获取awtk并编译

git clone https://github.com/zlgopen/awtk.git
cd awtk; scons; cd -

2.获取awtk-mvvm并编译

git clone https://github.com/zlgopen/awtk-mvvm.git
cd awtk-mvvm; scons

3.获取awtk-patterns并编译

git clone https://github.com/zlgopen/awtk-patterns.git
cd awtk-patterns
  • 生成资源
python ./scripts/update_res.py all

或者通过 designer 生成资源

  • 编译PC版本
scons
  • 编译LINUX FB版本
scons LINUX_FB=true

完整编译选项请参考编译选项

awtk、awtk-mvvm和awtk-patterns在同一目录。

运行

./bin/calculator

本文以Linux/MacOS为例,Windows可能会微妙差异,请酌情处理。

目录说明

  • src/calculator 传统实现方法。

  • src/calculator-mvc MVC实现方法

  • src/calculator-mvp MVP实现方法

  • src/calculator-mvvm MVVM实现方法

awtk-patterns's People

Contributors

xianjimli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.