[Original] blog garden third-party client-I blog garden App open source,-iapp

Source: Internet
Author: User

[Original] blog garden third-party client-I blog garden App open source,-iapp
[Original] blog garden third-party client-I blog garden App Open Source

Please specify the source for this reprinted article --Polobymulberry-blog

1. Preface

At present, the I blog garden App has been updated to version 2.0.0, using the latest blog garden Web API. Compared with the first version, many new features have been added and many features have been modified. Overall, the changes are large and the code is messy. So during the Qingming holiday, I sorted out the code. At present, the basic architecture has been formed (of course, it still needs to be optimized later), but there are still many things to be added to the basic functions of the App, and the App functions will be improved in the future.

The above briefly introduces the current situation of the App, back to the Open Source topic. The source code of the open-source App is actually my vision from the very beginning, but the code was very messy at the beginning, so it has been dragging on and there are many lab tasks in the middle, however, I never gave up the idea of open source. Open source has advantages over disadvantages for me:

2. New Version I blog Park App Effects

For the previous version of I blog Park, go to "third-party client of blog Park-I blog Park officially released App Store". Because of the new Web API, many new functions, such as library and login, are added.

Blog News Library
Me-log on I-non-Logon  
 
3. Introduction to I blog garden code structure 3.1 overall code structure

HomepageFeaturedICLog (@ "size count: % ld", [[SDImageCache quota dimagecache] getSize]); dispatch_async (latency, 0), ^ {[[SDImageCache quota dimagecache] clearDiskOnCompletion: ^ {ICLog (@ "cleared successfully"); ICLog (@ "size count: % ld", [SDImageCache returns dimagecache] getSize]); cell. textLabel. text = [self getCacheSize] ;}] ;});

② Some of them use CNPPopupController. The reason why this simple function also uses a third-party library is that I haven't thought about how to blur the background after the pop-up window, the database will be replaced later.

③ The review is very simple and will not be repeated.

④ Exiting the account is actually deleting the account information file stored locally.

3.2.6 boot page

Please refer to my previous blog "official release of App Store in blog garden third-party client-I blog Garden". I will not go into details here.

3.2.7 Main)

This part contains a lot of content, so let me separate it. As for the difference between Helper and Tool, please ignore it. I have little experience and cannot answer it.

3.2.7.1 Vender

It stores the rsa Encryption Algorithm of openssl. For details, refer to the blog RSA encryption.

3.2.7.2 Category

This stores a lot of things. I have always agreed with Tian weiyu's statement that category is a typical method of inheritance as a combination. In addition, I try not to place strong businesses in category. I think category should include some weak businesses.

3.2.7.3 Helper

Separates dataSource from ViewController and implements light View Controller. Refer to the document lightweight View Controllers.

3.2.7.4 Tool

** ICControllerTool **

It is mainly used to solve the problem of first installation or updating the App, and the boot interface should be started first.

** ICNetworkTool **

A layer is installed on AFNetworking, but I don't think it is well designed here. This is the first option for the time being. Next, we will try to call the discrete API.

** ICOAuthTool/ICClientCredentialsOAuthTool **

Because various access_token are used for network requests, for example, the access token with grant_type as client credentials and grant_type as password/refresh_token is different.

Therefore, I have defined these two tools to manage relative requests. The corresponding models are ICOAuth and ICClientCredentialsOAuth.

3.2.7.5 Controller

** ICLeftMenuViewController/ICLeftSideMenu **

Because RESideMenu is used, ICLeftSideMenu is actually a subclass of RESideMenu, while ICLeftMenuViewController is actually the LeftMenuViewController of RESideMenu.

3.2.7.6 Other

Put AppDelegate and main.

3.2.7.7 View

ICLeftMenuHeaderView is actually the one on ICLeftSideMenu:

4. Open-source issues 4.1 Open Source Address

GitHub: https://github.com/polobymulberry/iCnblogs

4.2 work after Open Source
  • Flash
  • Currently, other parts can only be viewed, but cannot be commented or deleted.
  • Search
  • Sharing
  • Refresh token does not work
  • There are a lot more. When I think of it, I will add it to the GitHub page ......
4.3 open source considerations

Because privacy is involved in some areas, I Will desensitize the code (ClientID and ClientSecret ). You may not be able to run it directly after the download. If you are interested, you can apply for a ClientID and ClientSecret in the blog.

5. Thanks

I would like to thank the postmaster for his help and guidance.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.