2017-07-28 73 views
0

需要開發可在iOS和Android上運行的應用程序。在貸款申請表上顯示的字段是動態的,因此取決於web服務響應。有這顯示對於用戶選擇的下拉針對iOS和Android應用程序的動態UI需要的技術推薦

設備兼容性偶數場:的iOS,安卓

領域包含:文本字段,下拉列表,單選按鈕,標籤爲標題,複選框。

建議除Objective C,Swift/Java等本機語言以外的技術。

JSON響應如下

[ 
{ 
    "title": "Tab1", 
    "Contents": [ 
     { 
      "title": "Personal Details", 
      "Values": [ 
       { 
        "id": "0", 
        "fieldvalue": "radio", 
        "label": "Salutation", 
        "values": [ 
         { 
          "id": "1", 
          "label": "Mr" 
         }, 
         { 
          "id": "2", 
          "label": "Mrs" 
         }, 
         { 
          "id": "3", 
          "label": "Others" 
         } 
        ] 
       }, 
       { 
        "id": "1", 
        "fieldname": "UserName", 
        "fieldvalue": "string", 
        "label": "FIRST NAME", 
        "length": "30" 
       }, 
       { 
        "id": "2", 
        "fieldname": "UserName", 
        "fieldvalue": "string", 
        "label": "LAST NAME", 
        "length": "30" 
       }, 
       { 
        "id": "3", 
        "fieldname": "UserName", 
        "fieldvalue": "string", 
        "label": "MOTHERS NAME", 
        "length": "30" 
       }, 
       { 
        "id": "4", 
        "fieldname": "UserName", 
        "fieldvalue": "string", 
        "label": "FAMILY NAME", 
        "length": "30" 
       }, 
       { 
        "id": "5", 
        "fieldname": "UserName", 
        "fieldvalue": "selector", 
        "label": "GENDER", 
        "values": [ 
         "Male", 
         "Female", 
         "Others" 
        ], 
        "length": "30" 
       }, 
       { 
        "id": "6", 
        "fieldname": "UserName", 
        "fieldvalue": "selector", 
        "label": "Education", 
        "values": [ 
         "Graduate", 
         "Post Graduate", 
         "School Level", 
         "Illitrate" 
        ], 
        "length": "30" 
       }, 
       { 
        "id": "7", 
        "fieldname": "DOB", 
        "fieldvalue": "string", 
        "label": "DOB", 
        "length": "10" 
       }, 
       { 
        "id": "8", 
        "fieldname": "Nationality", 
        "fieldvalue": "selector", 
        "values": [ 
         "India", 
         "America", 
         "Britian", 
         "Arabia", 
         "Dubai" 
        ], 
        "label": "Nationality", 
        "length": "10" 
       } 
      ] 
     }, 
     { 
      "title": "Residential Address ", 
      "Values": [ 
       { 
        "id": 1, 
        "fieldvalue": "string", 
        "fieldname": "housename", 
        "length": 30, 
        "label": "House Name" 
       }, 
       { 
        "id": 2, 
        "fieldvalue": "string", 
        "fieldname": "city", 
        "length": 30, 
        "label": "City" 
       }, 
       { 
        "id": 3, 
        "fieldvalue": "string", 
        "fieldname": "district", 
        "length": 30, 
        "label": "District" 
       } 
      ] 
     }, 
     { 
      "title": "Communication Details ", 
      "Values": [ 
       { 
        "id": 1, 
        "fieldvalue": "string", 
        "fieldname": "housename", 
        "length": 30, 
        "label": "House Name" 
       }, 
       { 
        "id": 2, 
        "fieldvalue": "string", 
        "fieldname": "city", 
        "length": 30, 
        "label": "City" 
       }, 
       { 
        "id": 3, 
        "fieldvalue": "string", 
        "fieldname": "district", 
        "length": 30, 
        "label": "District" 
       } 
      ] 
     } 
    ] 
}, 
{ 
    "title": "Tab2", 
    "Contents": [ 
     { 
      "title": "Employement Details", 
      "id ": "0", 
      "fieldvalue": "radio", 
      "label": "Occupation", 
      "Values": [ 
       { 
        "id": 1, 
        "label": "Salaried", 
        "fields": [ 
         { 
          "id": 1, 
          "fieldName": "companyname", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Company Name", 
          "isrequired": true 
         }, 
         { 
          "id": 2, 
          "fieldName": "designation", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Designation", 
          "isrequired": true 
         }, 
         { 
          "id": 3, 
          "fieldName": "joindate", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Joing Date", 
          "isrequired": true 
         }, 
         { 
          "id": 4, 
          "fieldName": "skills", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Skills", 
          "isrequired": true 
         }, 
         { 
          "id": 5, 
          "fieldName": "experience", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Total Experience", 
          "isrequired": true 
         } 
        ] 
       }, 
       { 
        "id": 2, 
        "label": "Self Employed", 
        "fields": [ 
         { 
          "id": 1, 
          "fieldName": "companyname", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Company Name", 
          "isrequired": true 
         }, 
         { 
          "id": 2, 
          "fieldName": "designation", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Designation", 
          "isrequired": true 
         }, 
         { 
          "id": 3, 
          "fieldName": "establihmentdate", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Established Date", 
          "isrequired": true 
         }, 
         { 
          "id": 4, 
          "fieldName": "projects", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Projects Done", 
          "isrequired": true 
         }, 
         { 
          "id": 5, 
          "fieldName": "employees", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Employee strength", 
          "isrequired": true 
         } 
        ] 
       }, 
       { 
        "id": 3, 
        "label": "Un Employed", 
        "fields": [ 
         { 
          "id": 1, 
          "fieldName": "employment", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Employment Mode", 
          "isrequired": true 
         }, 
         { 
          "id": 2, 
          "fieldName": "income", 
          "fieldvalue": "string", 
          "length": "30", 
          "label": "Monthly Income", 
          "isrequired": true 
         } 
        ] 
       } 
      ] 
     } 
    ] 
}, 
{ 
    "title": "Tab3", 
    "Contents": [ 
     { 
      "title": "Account Details", 
      "id ": "0", 
      "fieldvalue": "selector", 
      "Values": [ 
       { 
        "id": "1", 
        "fieldname": "Car Loan", 
        "fields": [ 
         { 
          "id": "1", 
          "fieldvalue": "number", 
          "label": "Loan Amount", 
          "isrequired": true, 
          "length": "30" 
         }, 
         { 
          "id": "2", 
          "fieldvalue": "number", 
          "label": "Tenure", 
          "isrequired": true, 
          "length": "30" 
         }, 
         { 
          "id": "3", 
          "fieldvalue": "number", 
          "label": "Interest Rate", 
          "isrequired": true, 
          "length": "30" 
         }, 
         { 
          "id": "4", 
          "fieldvalue": "selector", 
          "label": "CAR MAKE", 
          "isrequired": true, 
          "length": "30", 
          "values": [ 
           "Maruti", 
           "Honda", 
           "Renault", 
           "Mahindra", 
           "Ford", 
           "Fiat" 
          ] 
         }, 
         { 
          "id": "5", 
          "fieldvalue": "selector", 
          "label": "FUEL TYPE", 
          "isrequired": true, 
          "length": "30", 
          "values": [ 
           "Petrol", 
           "Diesel", 
           "Electric" 
          ] 
         } 
        ] 
       }, 
       { 
        "id": "2", 
        "fieldname": "Home", 
        "fields": [ 
         { 
          "id": "1", 
          "fieldvalue": "number", 
          "label": "Loan Amount", 
          "isrequired": true, 
          "length": "30" 
         }, 
         { 
          "id": "2", 
          "fieldvalue": "number", 
          "label": "Tenure", 
          "isrequired": true, 
          "length": "30" 
         }, 
         { 
          "id": "3", 
          "fieldvalue": "number", 
          "label": "Interest Rate", 
          "isrequired": true, 
          "length": "30" 
         } 
        ] 
       } 
      ] 
     } 
    ] 
} 
] 

回答

1

你的問題真的很一般。有幾十種有效的替代方案,這取決於你的要求。構建動態用戶界面不僅僅需要選擇「技術」。你可以用任何語言獲得。我會做的是序列化API調用,然後根據API「config」調用返回的對象構建UI。不過,您可以使用本機技術實現此目標(例如Android中的GsonRetrofit)。您可以使用Xamarin在C#中開發應用程序,並在iOS和Android應用程序之間共享代碼。你可以使用React Native。我不會根據您的要求選擇我的語言/平臺。