Summary and Thinking of pair programming project

If the project in terms of what has given me the greatest harvest, I will say that exchanges and cooperation. Of course, individual ability has been greatly improved, but also improve the aesthetic aspects, but those are just minor. I think, really a complete pair programming project, it is those who have a very good understanding, of course, a tacit agreement not only trained once.

Having gone through a time of replacement versions and feedback, time and time again by the exchange and discussion, and ultimately produced is so that I can inspire something. Here, special thanks to Liu Zhizhen students to give my strong support and confidence in the process, in my most difficult time to give my thoughts, I successfully completed the design and optimization of UI. So, this blog will review the main course of our project and a summary of the project and thinking.

 

Determining division Project +: separating front and rear ends

In a previous blog, I mentioned before, I very much appreciate Liu Zhizhen student code, although there are some small problems of his interface, but after some modifications does not matter. After discussion, we decided to do my front end, complete the design of the page, and to attain to do the back-end to complete the function. Page design and front-end personal project of almost nothing but logic between the parts of the page is useful, metaphorically speaking after logging into the system jumps to the selected page, select the difficulty of access to the system, and then can be a problem, and finally the correct rate, this logic is still the same.

The first problem encountered: Page Design

It can be said, do UI design is the biggest killer of page design, planning and realization of each component is very important to the overall pattern, in this process, I often could not sleep at night because I'm thinking about how we can make our page more beautiful, I kept thinking I started painting yourself.

                      (Draft)

Because without design, only to draw a rough idea out, and then set up, because before only in the Java programming course simple to understand, so I can only find some examples to learn from the Internet, then assembled himself, was thinking JPanel is padded with spaces to be filled to a position corresponding to the fill assembly. At this point probably get out about a page, because the design of nine pages, so there is no one-time to put the top.

 

             (Originally designed login interface)

The second problem encountered: UI too ugly

Although the page design out in accordance with the original look, but only to ensure that it neat, and can not get a good visual experience. At this point, to attain the back-end code has also been written, when splicing He said nothing, then send me a login screen to other sites, I was like a long time (since before the design also spent nine pages a lot of time, a few days did not how to rest my tired, and then at that time or a week before the deadline, I was impatient), I ended up with an inquiring tone asked him if he wants to optimize his tone firm pledged to, he said he did not know how much time, but anyway, after all, is our first project, regardless of income do not have to close later time lucky delayed, but also gave me some time. During that time, we both find a lot of good-looking website page analysis of learning toner color and background, to change the background by setBackGround (new Color (255,255,255)), to change the visual experience by changing the layout and color of the original word. After toning final week, finally becomes a little good-looking UI.

 

                (Before contrast with modifications)

Before the problem is converted into present experience, I can design a number of other ideas

After that I also added some other features, displays an error code will be displayed after the failure of current information, the password error after the analogy Change Password

Failure to display the current page using a thread to control the time the page that appears, specific code as follows:

public static void NewFrame() {  
            JFrame jf = new JFrame(){  
                @Override  
                public void paint(Graphics g){  
                    super.paint(g);  
                    Graphics2D graphics2d = (Graphics2D) g.create();  
                    ImageIcon ii1 = new ImageIcon("./img/login.jpg");  
                    graphics2d.drawImage(ii1.getImage(),0,0,290,223,null);  
                }  
            };  
            jf.setUndecorated(true);  
            jf.setBounds(610,275,279,223);  
            jf.setDefaultCloseOperation(jf.EXIT_ON_CLOSE);  
            jf.setVisible(true);  
            Thread t = new Thread(new Runnable() {  
                @Override  
                public void run() {  
                    try {  
                        Thread.sleep(750);//该线程睡眠0.75秒  
                        jf.dispose();  
                    } catch (InterruptedException ex) {  
                    }  
            }  
        });  
        t.start();//启动线程  
    } 

效果如下:

 

           (页面失效,重新登录)

另附注册页面提示错误时的显示:

 

        (密码错误,手机号错误)

 参与前端的同时与至臻交换身份互相学习互相找bug使我提升

在此过程中,我也和至臻互相测试以及改正对方代码的问题,在此过程中我们两个也因为对方的代码闹过矛盾。我的主要问题是命名问题,至臻觉得我的命名让他看的很烦,的确,UI因为组件过多以及排版和背景设计,会显得代码特别多;而至臻给我写的后端代码最开始是在main里面实现功能的,当时我提出要让他生成对应功能的函数,他最后也照做了。虽然期间有过不愉快,但是最后成品出来的一刹那还是挺快乐的。

 

通过这次结对编程,真心感觉收获巨多。

 

Guess you like

Origin www.cnblogs.com/sky-bug00/p/11603973.html