网页制作之从构思到实现

——FromJoomlaTemplateDesign(Page23)

Here is the overview; we'll go over each step in detail afterwards:
1. Sketch it : Napkins are great! I usually use the other side of a recycled
piece of photocopied paper—the more basic the better. No fine artistic
skill required!
Perk: Using this sketch, you can not only get your graphic interface ideas down, but also already start to think about how the user will interact with your template design and re-sketch any new ideas or changes accordingly.
2. Start with the structure: I create an ideal, un-styled semantic XHTML document structure and attach a bare bones CSS sheet to it.
3. Add the text: Lots of text, the more the better! A sample of actual content is best, but Lorem Ipsum is fine too.
4. CSS typography: Think of your typography (what font families you'd like to use and where you'd want text to be bolded, italicized, or otherwise decorated and varied) and assign your decisions to the stylesheet. Review! Don't like how the formatted text looks in-line? Being separated into columns with fancy background graphics won't make it any better. Get your text to look nice and read well now before moving on to layout.
5. CSS layout: Set up the layout—this is where you'll see upfront if your
layout idea from your sketch will even work. Any problems here and you can re-think the design's layout into something more realistic (and usually more clean and elegant).
Perk: Your client will never see, much less become attached to, a layout that would cause you problems down the road in CSS.
6. CSS color scheme: Assign your color scheme basics to the CSS. We're close to needing Photoshop anyway, so you might as well open it up. I sometimes find it useful to use Photoshop to help me come up with a color scheme and get the hex numbers for the stylesheet.
7. Take a screenshot: Time for your favorite image editor! Paste the screenshot of your basic layout into a Gimp or Photoshop file.
8. Image editing: Relax and have fun in Gimp, Inkscape, Photoshop, or Illustrator (I often use a combination of a vector editor and bitmap image editor) to create the graphical interface elements that will be applied to this layout over your screenshot.
9. Send for approval: Export a .jpg or .png of the layout and send to the client.
Perk: If a client has text changes, just make them in your CSS (which will update your text globally—no layer hunting for all your headers or links and so on) and re-snap a screenshot to place back in the Photoshop file with the graphic elements. If they have a graphical interface change, that's what
Photoshop does best! Make the changes and resend for approval.
10. Production: Here's the best part: you're more than halfway there! Slice and export the interface elements you created over (or under) your screenshot and apply them with the background image rules in your CSS.
Because you worked directly over a screenshot of the layout, slicing the images to the correct size is easier, and you won't discover as much need to tweak the layout of the CSS to accommodate the graphic elements.

内容概要:本文通过一个典型的嵌入式开发困境——因供应链问题需紧急更换传感器芯片,引出使用C语言实现工厂模式来解决代码强耦合问题。文章首先介绍如何利用C语言的结构体和函数指针模拟面向对象中的“接口”概念,定义统一的传感器操作接口(Sensor_Ops),实现业务层与具体驱动的解耦。接着展示“青铜段位”的简单工厂模式,通过switch-case根据宏定义选择具体传感器实现,使更换芯片只需修改一行代码。进一步,文章引入“王者段位”的自动注册工厂模式,利用编译器的section特性,将各传感器驱动的操作集自动注册到指定内存段,工厂通过遍历该段自动发现所有可用传感器,真正实现了“对扩展开放,对修改关闭”的开闭原则。最后阐述了该模式在硬件模拟(Mock)、多版本兼容和团队协作方面的实战价值。; 适合人群:从事嵌入式系统开发,具备一定C语言基础和项目经验的工程师,特别是常面临硬件变更、多型号产品维护或团队协作开发的从业者。; 使用场景及目标:①当项目中存在同类外设(如传感器、显示屏、存储芯片)多种选型,需要灵活切换时;②希望实现硬件抽象,便于在无实物硬件时进行软件仿真和单元测试;③构建多硬件版本产品(如Pro/Lite版),用一套代码库支持不同配置;④促进团队分工协作,降低驱动开发与业务逻辑之间的依赖和冲突。; 阅读建议:此资源不仅提供了代码范例,更重要的是传达了一种解耦和模块化的设计思想。建议读者在理解基本原理后,动手实践,尝试在自己的项目中应用简单工厂模式,并逐步过渡到自动注册模式,同时思考如何将此思想推广到其他模块(如通信、存储等)的设计中。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值