Coder Social home page Coder Social logo

yymvc's Introduction

yYmVc

第一款自己独自开发的JAVA MVC框架

1.基于配置,降低耦合性 mvc.xml

<?xml version="1.0" encoding="UTF-8"?>
<mvc>  
	<package>  
		<action name="login" method="login"  
			class="edu.cqut.action.UserAction">  
			<result name="success">/success.jsp</result>
			<result name="failed">/failed.jsp</result>  
		</action> 
		<action name="logon" method="logon"  
			class="edu.cqut.action.UserAction">  
			<result name="success">/logon.jsp</result>
		</action> 
	</package>  
</mvc>  

2.支持自定义后缀 webConfig.properties

action-suffix=action

3.模拟struts 2,无学习成本

public class UserAction extends ActionSupport {
	
	private String userName;
	private String password;
	
	private String result;
	@Override
	public String execute() {
		return SUCCESS;
	}
	
	public String login() {
		if(StringUtil.isNotEmpty(userName) && StringUtil.isNotEmpty(password)) {
			System.out.println("userName: " +  userName + "password: " + password);
			return SUCCESS;
		} else {
			return FAILED;
		}
	}
	//其他省略....
}

yymvc's People

Contributors

hacke2 avatar

Stargazers

YiJun avatar  avatar

Watchers

James Cloos avatar  avatar

yymvc's Issues

t

基本概念

CSS pixels

浏览器使用的抽象单位, 主要用来在网页上绘制内容。

device pixels

显示屏幕的的最小物理单位,每个dp包含自己的颜色、亮度。两者之间的换算公式:
$$CSS pixels=devicePixelRatio^2 \times device pixels$$

PPI/DPI(devicePixelRatio)

每英寸所拥有的像素(pixel)数目,下面为计算公式(有误差):
$$CSS pixels=\frac{\sqrt{deviceWidth^2 + deviceHeight^2}}{inch}$$
|名称| ldpi | mdpi | hdpi | xhdpi |
| :----: | :----: | :----: | :----: |
| 密度分界 | 120 | 160 | 240 | 320 |
| 常见屏幕尺寸| 240_320 | 320_480 | 480_800 | 640_960 |
| 默认缩放比例| 0.75 | 1.0 | 1.5 | 2.0 |

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.