I didn't realize you were there. Yes, I'm the Save the Children International. Thomas Chandy, I'll be the executive. Same job in India is also there. Was Arun in the? Ladies and gentlemen, welcome. Ladies and gentlemen, welcome to the closing plenary of the 28th India Summit run by the World Economic Forum. I'm really pleased to have the co-chairs of the meeting here at the closing panel, but also our distinguished guest, Montek Singh Alawalia, the deputy chairman of the Planning Commission, and one of the leading and most respected economists in India, and also one of the brains behind the reforms in the 90s, but also the reforms that we are seeing now. But before I turn to the panel and also a conversation with Mr. Alawalia, I'm also very pleased that we have the chief minister of the state of Haryana, Bhupinder Singh Huda with us here today. He will then greet us and send a message to all our distinguished participants. So, chief minister, the floor is yours. Please. Good afternoon, all of you. Dr. Montek Singh Alawalia, Deputy Chairman Planning Commission of India. Mr. Bhoge Brandi, Managing Director, and friends, delegates, ladies, and gentlemen. I hope that your stay in Gurgaon was comfortable and enjoyable. I'm delighted to be here at the closing session of the World Economic Summit on India. The VEF summits have always provided an occasion for leading economic thinkers, policy makers, and professionals to come together and reflect on major economic trends in India. I would like to compliment the World Economic Forum for the enthusiasm with which they have been organizing these annual summits. As we come to an end of the discussions, I'm sure, there will be some new ideas and take-away resulting from three days of deliberations. As per the scheduled program, I was to participate in the discussion on United States of India. But since the program has been rescheduled, I have decided to attend the closing session of the summit. I would like to take the opportunity to apprise you of Haryana, the whole state. Friends, only a few days back, Haryana completed 46 years of its existence. During these years, the state has made an all-round development. Haryana accounts for a mere 1.3% of the total area of the country, yet it contributes nearly 3.4% to the national GDP, with per capita income of US$2,000 during 2011-12. It occupies the top position amongst the major states of our country. From being primarily an agrarian state, it has grown into one of the most industrialized economies in the country, while services and industrial sectors continue to be its main state. The state continues to maintain its leading position in agriculture sector. Haryana today has succeeded in harnessing the progressive thirst of industrialization by dint of innovative system and pragmatic strategies, thereby becoming a pioneering state in the modern India, the state of art infrastructure, industry-friendly policies, responsive administration, peaceful law and order condition, and abundant skilled manpower make it a preferred destination for industrial investment. The Haryana growth story can be understood by the fact that an average annual growth rate of 9.4% has been recorded in the past seven years, from 2005-6 to 2011-12. It is substantially higher than the national growth rate of 8.4%. As per the recent SOChem report of October 2011, 87% of the total investment received in Haryana are from private sector, which is a clear indication of confidence that Haryana generates among the private investors. A report of September 2010 by the SOChem states that the Haryana achieved 81% implementation rate of pledged investments ahead of states like Gujarat, Maharashtra, Tamil Nadu, and Karnataka. As per the CMIE report of 2007, Haryana achieved the top position in terms of per capita investment. As per India's today's state of state study report 2011, Haryana is ranked as the top state in most improved big states, health and education sector categories. The state has bagged the most competitive state award 2011 in the category of most innovation-driven economies conferred by Institute of Competitiveness and Mint. Creation of infrastructure of international standard has been our constant endeavor. We are striving to improve connectivity, ensure quality power supply, water supply, and what power effective logistic support to industry. The KMP expressway will facilitate seamless connectivity of Haryana. A global corridor has been planned along its 135 kilometers route, which offers new opportunities for development of theme-based activities. We have already brought Metro to Gurgaon. Metro connectivity to Faridabad is under construction. Similarly, the Metro connectivity to Bahadurgarh has been approved. Rapid rail connection to Bani Pat is also on the annual. Our other initiatives include a cargo airport, upgradation of national and state highways, intercity connectivity, intracity transport, including rapid metro, et cetera. A number of infrastructure initiatives have been planned under Delhi, Mumbai, Industrial Corridor Project, which will throw up huge investment opportunities. The industrial infrastructure in the state is being strengthened to development of new industrial model townships and industrial state and expansion of existing states. Niche parks such as the food parks, IT parks, are being developed under the cluster development strategy. Breaking away from the traditional way of governance, we have adopted a model which facilitates hassle-free and time bound approvals. Our government has positioned itself in the role of a facilitator. The industrial and investment policy 2011 of Haryana facilitates promotion of investment into the state. In order to provide a level playing field, we have simplified rules and procedures and fixed timelines for clearances so as to improve efficiency and transparency by way of Haryana Industrial Promotion Act of 2005. The state has also emerged as an education hub and both of world-class infrastructure in sports too. The players of Haryana have brought laurels not only to the state but to the entire nation. It is a matter of pride that our players have begged four out of six medals won by India in London Olympics 2012. During the last seven years, there has been unprecedented expansion of education infrastructure. The number of technical institutions has increased from 161 to 640. And annual intake has gone from 28,445 to 142,000 to 26. During this period, we are also taking steps to create a sizable pool of technical and skilled manpower to take advantage of knowledge economy with setting up of institutes like IIM at Rotak, IIC at Manesar, FDDI at Rotak, CPET at Murthal, Defense University at Gurgaon, Central University at Mahindragarh, Rajiv Gandhi Education City at Sonipat, Women's University also at Sonipat, and sanction of NIFT and NID, National Institute for Design for Haryana. The state has emerged as an education hub. Only yesterday, the Union Agricultural and Food Processing Industries Minister inaugurated the National Institute of Food and Technology, Entrepreneurship and Management at Kundli. This institute would go a long way in improving the capacity building and the skill enhancement in food processing sector. The private sector can avail of this opportunity by identifying niche areas where skill development in initiatives are required and help devise the required curriculum to create the desired skill sets. In the health sector also, we have identified a number of focal areas and devised key strategies. Health services are being expanded and new medical colleges are being set up to achieve the goal of health for all. It is also our endeavour to involve the private sector in the development of medical infrastructure and facilities through public-private partnerships. Any vision for growth remains a mere pipe dream, unless it is supported by good governance and political will. We have an excellent track record on law and order front with one of the lowest crime rates in the country. The workforce in Haryana is diligent and hard-working. The number of mandates lost on the industrial front in Haryana is one of the lowest in the country. Haryana was one of the first states to come out with a comprehensive and progressive labour policy. Friends, our government has always been responsive to the needs and aspirations of the farmers and land owners. It is with this key priority, in view that we notified our landmark rehabilitation and resettlement policy, which eventually emerged as a role model. The policy provides for innovative landowners for 33 years over and above the land compensation. Our recent innovation of land pooling scheme would further ensure the farmers and hard landowners not to get only maximum benefit, but also get a fair share in the development projects. Haryana is one of the few states that have agreed to the FDI foreign direct investment in retail. We expect that the move will benefit the farmers, consumers, and enter paneurs, apart from building up the rural infrastructure through cold chains, food processing centres, and warehouses, et cetera. Friends, as you all know, we are passing through a global recessionary phase. The impact of information revolution has raised the expectation and aspirations of the people. It is important for the industry to have a connect with people in the areas they are located. Gone are the days when industry and business could afford islands of prosperity without showing much concern to the people around. It is here that I would like to stress that the industry should strive to make a difference to the lives of the people, much more to the people around you, by giving a meaningful and practical shape to the concept of corporate social responsibility. Friends, it seems we are passing through a phase of difficult times of human history. On one hand, people are throwing off shackles on non-democratic regimes and opting for democracy as a preferred form of political order. On the other hand, liberal capitalism has emerged as a preferred form of economic order, while democratic institutions are gaining ground. Doubts are being expressed about the sustainability of market-led economy orders. No doubt, this order leads to faster growth but also creates income disparities. We have to balance the two. How do we do that is a tough challenge for us. All this is a part of the evolution of humankind. What we need is a firm resolve among ourselves to generate the right kind of atmosphere to harness the people's energy to promote culture of positive thinking and constructive action. Equally important is the challenge of dealing with the prophets of doom. You represent an elite and your credibility is quite high. I urge you to forge an intellectual alliance of right-minded people to fight the menace of negativity and cynicism. Let me end by thanking all of you for what has been a very useful exchange of views and ideas. We hope to continue benefiting from your knowledge, wisdom, and experience. I wish you all the best in your efforts to contribute to the process of building India. I also thank you for coming to Gurgaon and wish you a safe journey home. I thank you all. Thank you very much, Jaheem. So thank you so much to Chief Minister Huda from sharing with us also the success story of Haryana. So let's turn to the panel and to the Deputy Chairman of the Planning Committee of India, Montek Singh Alovalia. Looking at the global economic situation, we have been through the worst crisis since the 1930s. Are we now seeing a light in the end of the tunnel or is this just a train coming closer? No, I think there's no doubt that the global economic situation is not very healthy. But I would say that it's probably better than it was five months ago. Two changes since the last five months. One is I think that what looked five months ago like a high degree of uncertainty about whether European or Eurozone policy makers would be willing to actually do what is necessary to make sure that the euro survives. I mean, there was more doubt about that five months ago. I think there's much less doubt about that now. So I think there is a perception that the euro as a currency is not going to crack up. There's a lot of uncertainty about whether the policies that individual European countries follow are going to sort of end up leading to an early resumption of growth or lead to a sort of pretty stagnant or anemic economic situation for several years. That still remains uncertain. But I think the disappearance of the prospects of a currency collapse are a very important change in the situation. And the other change is obviously the political change in the United States. Most important economy in the world. And you have an election that has produced a mandate for President Obama and a better outcome in the Senate. So my guess would be that many of the uncertainties about the fiscal cliff, et cetera, which were worrying people, I mean, they haven't disappeared. But I think the situation is a lot better from both those points of view. Do you first... There are a lot of problems that remain and we're facing them ourselves too. Do you foresee any change in the economic policy in the second term of an Obama administration when it comes to economy, trade policies, and et cetera? Well, it's difficult to predict. You should never predict policies based on whatever was said during an election campaign. So I think the Americans have a very good tradition that there's quite a period of time between now and the inauguration. Presumably, President Obama will give some sense of what he wants to do and we should wait for that. I do think in terms of global trade, the U.S. has an opportunity to signal a process that would really get people seriously thinking about what are doable compromises. I mean, the fact is that in Geneva, none of the negotiators has seriously looked at issues because they're all waiting for the U.S. election. Now the election's over, so let's see what happens. It is tough, I mean, because ideally we should be, if this was a situation where there was very robust economic growth or an early resumption around the corner, you'd get one sort of attitude towards trade. That's certainly not happening. But still, there is a matter of leadership here which will be tested because is the global economy going to let the Doha round simply fall by the wayside? That's the question. There is also a changing leadership this week in the second largest economy in the world being China and the most populous country in the world. Do you think this will also have any impact on the willingness to agree on additional global deals and compact when it comes to stimulating the economy? Well, I hope that, you know, whenever you get a new leadership in place and if the process is seamless, the new leadership is obviously going to give signals about what its future actions are. So you're right, I mean, the largest economy and the second largest economy will in this period have put forward, will be entering into second administrations. But we need to wait and see what signals emerge.  So maybe we should then turn to the largest democracy in the world being India. And we have seen that India throughout years now have had quite an impressive economic growth, 89%. The last year it's been more sluggish coming down to 5.5%. In your view, how much of this more sluggish growth it caused by internal factors and how much of this is a result of the global economic sluggish growth? Yeah, well, just one correction. Last year it was not 5.5, it was 6.5. What you've got in the last two quarters, one of which was belonging to the last year and one of which is this year is around 5.5. So the real issue is, I think somewhere there's clearly been a lowering of growth forecasts for India. We started the year thinking we're gonna do something over seven and it's been lowered since then. But on present prospects, probably the first half will be around five and a half. My view is that I think there is some signals of a turnaround. It's uncertain how strong that turnaround can be. So in the second half we'll do better than 5.5, but some people think, well, we'll be lucky to reach six. I don't think it's too important to put a number to the current year. The really important thing is, is the economy turning around? I think it is, but it's too early to be confident. Three months later, we'll have a much better idea. Now, the main question was, is this entirely because of the global situation? No, I mean, that's not our view and we have repeatedly said that. There's no doubt, by the way, that the global economic situation had an impact on India. I mean, our exports are doing pretty poorly. More than the impact through exports is really the impact of a decline in animal spirits everywhere. I mean, I think what happens when the world economy is booming, all kinds of shortcomings in every economy get ignored. When that doesn't happen, everyone shines a spotlight. So we've been shining a lot of spotlights ourselves and a lot of people are shining a lot of spotlights or not. I don't think any of the problems that people are worried about were not there two years ago or three years ago. It's just that when the economy was booming, everybody thought, well, this will somehow take care of itself. I think it will take care of itself. But one advantage of recognizing that there are domestic problems is that you get around to trying to solve them. And I think government has given lots of signals about what it intends to do. I think the finance minister has made it very plain that he thinks the fiscal deficit is too high. We need to bring it down. He's not gonna bring it down in one year. And that's not even reasonable. I think the current view globally is that you really ought to have a credible adjustment program. He's got a program which will bring it down to, from whatever it was last year, close to 6%, comes down to 3% by the end of, by 2016. That's a modest base of reduction. We have lots of problems which we've focused on which relate to implementation of large projects. And I think those we're currently struggling with to put in place mechanisms which would allow infrastructure projects to get the necessary clearances rapidly and transparently. You know, without sacrificing the objective for which those clearances are there, you know, environmental, et cetera. But it has not worked as seamlessly or smoothly as it should. And the government is currently focusing on that. There were many, many tax related issues that came up in the last budget. And I think the government has said that they are going to actually fix those problems. Various committees have been set up. Their recommendations are being looked at. Other reforms that were, you know, in the pipeline have moved forward in the last three or four months. I think the government is clearly giving a signal that we know that a lot needs to be done domestically and we've started doing it. I think we need to do more. Looking at the reforms, when do you think you're gonna see the first positive impact on growth in China, not in India, stemming from the implementation of the reforms? Growth in India, yeah. You know, I would guess that we should certainly see in the second half of the current year, a better performance than in the first half.  My feeling is that next year, next fiscal year, which begins on April 1, it's not impossible to target a growth rate of about 7%. If we fixed all these problems between now and then. And of course, a lot depends on what happens to the global economic situation, which seems to be improving. So if you combine the effect of a lot of domestic corrections with the effect of a sort of greater stability and a more positive mood globally, I think we can see a revival of investment in India, which would actually take it up. You know, the dominant factor that will affect growth in India is the rise of investment. We are not counting on a huge increase in exports. We've never been an export dependent economy in the same sense. But what we've seen in the last three years is maybe a three to four percentage points reduction in the rate of investment. That's what needs to be reversed. And the reforms can lead to that. But why did it take, why didn't the reforms come two, three years ago already? But that's a very good question.  We are a coalition government. We are highly participative. You could even say fractionated polity. And any government which wants to move forward has to try to get everybody on board. Sometimes you try for a little too long. On this occasion, it's clearly the case that the government did not, they did not sort of hold back until they got everyone on board. They just decided that we've tried enough. Now let the people judge. And I think that's the right approach. You can't sit around waiting for a consensus because most of what we've done, there isn't a consensus, at least as far as it's publicly expressed by many of the opposition parties and even some of those that were supporting the government earlier. So this is a test. I mean, you know, will it work? You have to be willing to crush some eggs to make omelette. That's what you were saying. Okay, let me turn to Mr. Paul Balka, CEO of one of the leading companies in the world. Nestle, listening to the Indian government and to Montek Singh Alawalia here, are you sharing his overall more bullish perspective on the global economic situation? Well, yes, I do share the story of it. And I want to come back for consensus. It's very hard. It's very hard for tough decisions to have consensus anyhow. So, but I'm an optimist, although they say that a pessimist is a well-informed optimist, well, I'm happy not to be too much informed then, but actually if you see the title of this session here, it is from Deliberation to Transformation, which is basically saying from words to action. And actually it is in many respects, I feel India, specifically India is on crossroads. And it is actually a coincidence, maybe by chance or foresight that we have the WEF talking on India, just when government has taken, has reshuffled quite extensively the government in itself and also has taken quite expressive actions and reforms that are quite explicit. And that is actually a base of optimism. You hear also saying, well, we need action and because growth was slowing down, we took too long to do what was obvious to do. And that is a strong leadership. At the end of the day to go through difficult times and all that, you need strong leadership. You need to have an inspirational purpose creation to all stakeholders. And I do see that happen, happening now. It is true that we also live with paranoic and when growth was eight, nine percent, everybody was saying it's gonna overheat. Now it is five, six percent, that's not good, it should be more, but now everybody say it's a drama. We should have a little bit more perspective on these things and give time to time without losing time. That's the problem, we may be losing time. We have heard over the last two days many, many things that are quite obvious that has to happen in India. We know that. We spoke about infrastructures and going about that because that's the framing where you then can have economical activity flourish in a productive way. We spoke about other dimensions like food security. We spoke about also this dimension of simplification. Overregulation is equal act of fixation. And we know that these are the framings where you can have investment coming in, private investment, be it local, but also foreign investment. And we have heard now, again, speak about this framing of having these investments coming. My company is now, this year we are 100 years in India. 100 years. So speak about commitment and trust. And we just inaugurated an R&D center, which is again helping to shape and be part of India. I do two words I would say, simplicity and continuity, consistency. That is things, these are the framings that helps the country to really invite the economical activity to flourish and make it inclusive to a certain extent. Mr. Alovalia was underlining also the importance of then increasing the foreign direct investment, investments in general in India, because that has been reduced by 3% the last couple of years and has not been increasing. Do you think the reforms that the government have put on the table now, they're sufficient to then break this negative trend? Are you impressed by the reforms? Are they what it takes at this crossroad, as you were mentioning? Defining and making reforms explicit is one thing. But seeing traction of implementation, which is again action is another thing and I think that's the challenge. And once you see that coming, that there is really execution and discipline behind them, that's the environment where foreign investment comes. Investment comes when you see returns projected in the future. And that is linked with consistency again. And I think, well, all the actions and all the decisions are there on the table. It's for us to make it happen, or the government together with all the stakeholders because it's not only government. It is also so that the negative noise I feel when you read also local press and all that is always around and there's so much more negative voices that doesn't help for the external projection of what is India about creates anxiety. And I feel press can do a good job here too, to create a little bit more shaping together that common purpose. If you see the potential, the sheer potential of this country, we can link it up with the world and all that, but intrinsically, this country has an amazing potential on its own. If you then also connect that with the outside world, it leverages that. But there's so much to be done here. And that's where private investment should come in to be part of that. Mrs. Chesmin with Fred, you wanted the floor. Maybe you would also like to comment on what is seen as one of the real global risks these days is the growing inequality. Even in a situation where we have had growth, we have seen also growing inequality. I'll come to that. I just wanted to pick up on the point that Montexim was making about, or actually through your questioning that was being made around really looking at the role of the US and looking to the US for leadership, for example, on the Doha round. And we were talking earlier about actually, there's a role for India there as well in terms of taking a leadership position with the G77. And that's one of the things I'm just thinking about the forum this year in India. I was kind of surprised to see less appetite than one might imagine from the outside, from India, to really play a full leadership role in the world, whether it's with the G277 on trade or whether it's there was a session with India's neighbors who were really looking to India to play a role, a leadership role in the region. Also, all of the innovation that's just been said that goes on in India actually, not just in the IT sector, but in the social sector as well, whether it comes to innovations for how to save newborn lives. So it was just a session earlier with some of the leading thinking that's been published in the Lancet and recognized worldwide is now being taken on by the Planning Commission, I know, in India, but also in many countries around the world. So really just a reflection that I think, I know that there are concerns internally within India and quite rightly you're focusing on some of the challenges that you're facing in India and that's all right and proper, but there is also an opportunity for India to play a role globally. Maybe we should ask Mr. Alovalia, will we see more of this kind of leadership in G77, in G20, in brick context from India side? You know, I'm not, I mean, I'm not a diplomat, so I never know what... That's why it's interesting what you answer. Yeah, my view is India should play a constructive role. I think if we can lead ourselves, that's good enough. The idea of us leading the G77, I'm not sure the G77 wants to be led by us and I see no reason why we should be the only ones leading the G77. I think we need to be clear. We have, you know, as in every country, I think Mr. Huda made a very important point towards the conclusion of his address. When he said that coming out of the West at this point is a huge amount of questioning about the, you know, effectiveness and fairness and this and that of the so-called liberal market economy. If you like, it's a kind of intellectual world fast which is swamping developing countries based on very narrow perception. Incidentally, it's largely propaganda in the sense that they're not changing their policies at all. They're doing exactly what they were doing by and large but has put a whole lot of new things on the agenda that the market economy leads to inequality, there's that and the other. I mean, we've always been sensitive to this but what's happening now is that people are saying, well, you see even the West is worried about it. Now the fact of the matter is that any country at our level of income to persuade people that we need to integrate globally that is good for us, that we will actually, as Mr. Gopal Krishnan sector best demonstrates, we can actually do very well in that world. It takes a lot of time. So frankly, most of our leadership capability in my view should be directed internally. And I think if we come out with an India which is speaking with a clear voice the rest of the world will look after itself. We do have very strong interests in the Doha round and I think the way I would describe the Doha round situation really as follows. After a lot of negotiation, the differences between the industrialized countries and most of the developing countries had got narrowed down and we were constantly being asked that why can't your fellows be more flexible and why are you taking, you're at one end of the spectrum of the narrowed spectrum. Now, you know, when you negotiate that's exactly what happened. I mean, negotiators are tough guys. They're not softies who readily concede. What has derailed everything is that what was said to be the agreed narrowed spectrum has been taken off the table and we say, well, that agreement isn't there anymore. So the goalposts are changed. It's gonna take a lot of, it's possible that in a global negotiation to take that view, I don't deny that. But don't be surprised that when negotiators come home and they find that if you're changing the goalposts you're really reopening everything. That's not politically easy to handle. So the real issue is will the new leadership globally somehow be able to say, well, look, we must be able to make progress. And you know, how that's going to be done whether it's going to be done in the WTO, the full group of countries, the quad, the smaller group of countries, G20. I mean, all of this now becomes really interesting. And the paradox is also that, you know, when it comes to quantitative easing, stimulating the fiscal policy, although those measures are no use. So one of the areas where you can contribute to reviving economic growth is to agree on a global trade deal. And currently the global system is not able to do so. But then turning to Gopala Krissnan, Executive Co-Chairman of Infosys. When you're listening to Mr. Alawali's outlook on the economic situation, but also the reforms that the current government know have introduced in India. Is this enough to revive economic growth in this country? First of all, you know, it was important to say that we are back on track on reform. So that is very much necessary. And that is a very positive signal, saying that we are back on track on reform. We want growth. It's been reiterated again and again. Is it enough? No, we have to follow through and make sure that the implementation happens. And we also have to follow through because we have to do a lot more. And it is actually in the agenda at this point. So we have to make sure that we follow through and look at some of the other reforms that needs to follow, especially when it comes to infrastructure, things like land acquisition, you know, all the approval processes, et cetera. And we have to figure out what is the right mechanism. And this is what I believe, you know, very important. And it has come about in some of the discussions that have happened in the forum this time. Because I think with lot more information available to people, with lot more power with people, lot more voice to the people. How do we do a negotiation which is supposed to be done? Negotiations are typically supposed to be done in private, actually. So it is actually a very interesting situation. I was just in the panel which is talked about internet and freedom of speech, actually. You know, we have to discuss this without emotions in order to actually come to some narrow areas where we can agree on and maybe areas where we can disagree on and come to compromises, which is the art of negotiation. But then if it is just all emotions and taken to public forums before, we can actually finish the negotiation. So that's, I think that is what is happening to some extent in India with the challenges that we are faced with. But I'm glad that the process has started. You know, and this is where leadership is also very, very important. Leadership has to create a positive story. Why? Maybe everybody has to give up something. I think that's what is, I think, positive for me at this point. Siddhartha Lal, you're a young global leader, a very successful, also, young businessman representing 400 million of young people in this country. Listening to this discussion about reforms and the economic situation in India and the opportunities that have to be created for the young people of this nation, what are your reflections? Well, I too, as was said earlier, I too am extremely optimistic about the future. There is an enormous potential in the country. And obviously we've discussed some of the areas which are holding us back. And I think I'm gonna use some of the things that I've heard over the last couple of days in trying to save what that's coming around to. So one of the things is that, and I heard Geeta Gopinath saying that yesterday, was that we see reform as this monumental, this moment that the government is going through a reform phase. Doesn't need to be like that. It has to be on a daily basis. It has to be on a regular basis. I mean, the scale of reform, the propensity and the number of legislation which is going by has to be 10x, 20x. That's the type of speed of reform which is required to employ 100 million people, which is what the requirement is in the coming years. So to take care of the urban situation which is what's happening, I mean, you're gonna get 300 million more people in urban India in the next 20 years or so. So it is, we're dealing with a lot of scale here and we need to actually move forward in a much, much, much faster fashion. But I mean, but having said that, I still think that there is reason to be very optimistic about all of this because we've reached a point where I think from every angle, there is nearly, it's like there's a force to actually change. But I wish it wasn't required that there has to always be so much pressure that then the change comes through. It should be a more natural process. And I think that's what I'm trying to grapple with in terms of why does it take so long? It's the same with the corruption issue which we dealt with very well on this forum yesterday as well. I mean, it's taken the entire public opinion and lots of discussion and it's all out there till of course, then of course, now some things are being done about it. So which is good.  But yeah, that's, but I think it would be better if things would actually just move on with trust. Chavir Rajavath, Sarpanj of Soda, listening to this discussion and also what was just said about corruption. You are really working in villages and working with the people of India. Is this with corruption and lack of governance? Is this something that people are very conscious about and what are the reforms that is needed in India? I've seen from your viewpoint, more bottom up. Sure, of course corruption as we know it. It's a grappling issue. It's something that bothers each one of us to the very bottom of the pyramid to every individual across the strata in India. But that I believe is not the only issue. There are very many and of course, we do need reforms and very again, many more as far as the grassroots level is concerned as a larger population in India continues to live in the rural sector, which has not really seen the development. And yes, GDP has been, it's been fairly good. And there has, however, the sad part is that doesn't really, the trickle down effect to the last minute doesn't happen. And I think that needs to happen and we need to work more towards ensuring that there is a holistic development of our nation. And as Mr. Alvalia said, yes, we have lots to look into, we need to look inwards and work towards improving that and then look out. But at the same time, I think what really has come across through this forum has been the fact that as we all know for any progress or any development for an individual, a community or a nation, it is important to have partnerships and collaborations. And I think we need to go ahead with those and work towards development. And of course, when I say that, I'm also going back to the sector that I'm from, from the rural sector, the only way forward for us in villages is to have that support system come forward to us, be it from the government or be it from the non-government sector. And I'm hoping we'd be able to take that forward. What I really appreciate is the fact that we've been, when I say we, I'm talking about the villages of India, are getting a platform over here to speak about our issues and I'm hoping we will be heard and things will improve for us. Mr. Alvalia, we have spoken a lot about economic reforms and economic global situation and prospects. If you're looking at reforms in a broad context for India, education, infrastructure, inclusive growth and et cetera, could you share with us some of your views on what is needed of reforms in those sectors and where you would like to see your country based on this in 10 years? We've just finished the 12th five-year plan, which is just under a thousand pages. So if I start giving you a comprehensive account, I mean, those things lay out a huge roadmap. But look, we have a very long way to go and every one of the areas that you mentioned pose specific challenges. Some of them, some of these challenges are dominantly financial. Some of them are largely technological. Many of them are really social, institutional delivery issues, which are quite complex. So one of the things I think we should recognize is that reforms are not the kind of thing where if somebody were to sign an order, that would get done. I mean, very often we're trying to create institutions that are going to work. Very often we're trying to empower institutions that already exist. Like the third level of democracy that there is in the Constitution hasn't got empowered. So frankly, it's a huge agenda. All I can say is that I think a lot is happening. And I think if you were to judge by any aggregate metric, things in the last 10 years, these are the years of rapid growth, things have come out better than they did in the previous 10 years. And that's not just growth. That's even true of things like how much reduction of poverty, what happened to infant mortality, raise this, that, and the other. The difference, however, is that we're now, firstly, we're much more concerned. I mean, 20 years ago, you didn't have NGOs going out there, subjecting what was going on to the sort of, if you like, scrutiny and standards that you would actually expect from an urban environment. So nobody bothered very much. That's happening today. I mean, you declare the right to education as an act, which we've done. Immediately, people ask the question that is the quality of education provided everywhere the same? And to do that will take 30 years, not just passing an act. So I think what's happening is that participative democracy, which is giving a voice to people, combined with a very free press, is actually holding up a mirror to our face in every different dimension. To say that at the end of it, therefore, what comes out naturally is that a lot of shortcomings hides the fact that there's also a lot of progress going on. And I personally feel that in any one of these areas, if you ask the question, are there positive stories, are a lot of good things happening? I think you'll find that there are a lot of positive stories. I don't think that the moment they're aggregating to a movement. So the real question is, in the next 10 years, is the system going to learn from these positive stories and sort of create an institutional mechanism that will make more of them happen, or will they be stamped out and will only be supporting the failures? I don't think we'll be doing that. So if you look at it from that perspective, we need lots and lots of things. And I would say, by the way, that almost two-thirds of what needs to be done is now in the hands of state governments, not the central government. And differences across states are really enormous. Virtually any statement about India in terms of aggregate performance and all these things hides the fact that the variation across states is enormous. Now, this has an important implication. I mean, if you find that in three or four states of India, whatever total fertility rate has really collapsed, this is going to feed back into the rest of the system because this is all part of India where it's happening. Making international comparisons never really has the same effect as being able to say, well, look, if it can be done here, why can't it be done somewhere else? I expect to see that in the next 10 years. Just mean with, Fred, you wanted a short comment. Well, I just wanted to come back to the question you asked me earlier on inequality, but also, I'm glad I'm doing so now because you've touched on some of these issues, those wider reform issues that you're talking about like child mortality, for example, and the kind of universal health for all and some of the reforms that are being brought in there. I mean, I think my reflection on this forum is that there does seem to be increased recognition of these, you could call them social issues, but actually they're also the underlying drivers of the potential transformation of India. Drivers such as the very low value that is placed on the lives of girls and women witnessed by the sex ratio that was talked about in an earlier plenary and the low percentage of women in the workplace. And drivers such as the fact that nearly half of all Indian children are malnourished, which means they're risk growing up stunted either mentally or physically. And so that on the positive side, I do see that that is being increasingly recognized both by the government and by conversations and collaboration in forum like this. On the downside, I think that there still isn't sufficient will to really tackle them. And it's a little bit, as Sid was saying, it feels like you have to build up a tremendous head of steam before any of these issues really get tackled. And it seems a shame because actually everybody agrees they need to be tackled. So can't we get on and do it now? You want to comment, sir? No, no, I agree. It's not really just the government. Me or? Yeah, Mr. Alualia, yeah, for example. No, no, I agree that the, there is I think an awareness that these are important issues. And you know, I believe progress is taking place. You mentioned half of all children being malnourished. You're kind of rounding it up from 40% actually. 40% huge number, but the second, no, because I think some interesting issue here. The only officially known number on child malnourishment comes from 2005-2006, this is our fault.  But as a result, I mean, the 11th plan started in the year 2007, 2008 and said, look, this child malnourishment thing is a disgrace, which it is. What I'm saying is we have no idea at the moment what has been the impact of these programs. I don't think it's gone down massively, but I have no doubt whatsoever that there is more progress than there was in the previous 10 years. But I would not be surprised at all if we still have whatever 33%. And that is unacceptable. I mean, in the sense that it's very difficult to take it below 15%. But going from 33 to 15, that's the objective. And it's something that should be done in 10 years. There's no question, in my view. If I may just add to that. I think, as Mr. Alivalia said, there is stuff happening. We have social entrepreneurs who we got to see doing this forum as well. It is, of course, the responsibility of the government, but because the issues are so vast and so huge, we do grapple with how to figure those things out, how to work around it. But even when it comes to providing the very basic amenities, drinking water, shelter, food security, security for women and the girl child, et cetera, we want to work, the government wants to work. It is making an attempt, but the numbers are so large. And that is where I feel the private sector needs to come in. We need more social entrepreneurs. And I think we need to give them more space and a platform to come up with various ideas and help. And I think PPP models could perhaps be the best way forward for India given the large scope and the vast expanse and diversity that we have in our nation. And I think that's something that we need to be open to and work forward to it. Mr. Bilkan, may you're coming close to the end? Just one comment, and that has been mentioned. The issues are so huge, and it is indeed, and you spoke about 1,000 pages of program and somewhere you have them to simplify. And because you spoke about the journey, this is a journey, but I speak about consistency, I spoke about that before. And sometimes you feel with all these issues and malnutrition is definitely one of the major, major problems you have because the productivity of the whole country depends on it. And so many resources are going dragged into it if you don't tackle it now. But also sometimes you feel the government has to do all that work. And I believe there is somewhere a leveraging of government framing and having consistent policies, but then let also the private sector play a role, frame it well, but the private sector, when it plays into a very framed direction, can create so much wealth. Industrialization is definitely another point where I feel that can absorb so much wealth creation and that is very much more cappler and goes much more deeper into the society than I may remember that there was a saying that say, well, for India, we want computer chips, not potato chips. Well, and you need computer chips, but potato chips was industrialization. And that is something that I feel can do so much wealth and create so much many jobs that you then also with the rural areas to absorb part of the rural areas that are now stuck into agriculture in an not very efficient way. And how the attraction of foreign direct investment in the food manufacturing can help there too. Because as I said, we have been for 100 years here, but how we can in the Moga, in Moga, we are linked up with 100,000 farmers who bring to one factory their milk and how we have been developing that together. So there is a cross crossing of private sector, what is called sometimes self-interest, but also we call that creating shared value. That is that an economical activity of companies should when it is framed in the long term and with a set of values, should yes, create success for the company, but also create a success and value for society at large. And that's somewhere also an expression of trust that the private sector can be definitely a very, very important part of that creation and that equation. So since we're now coming to the close, I'll leave one minute to each of the coaches if you want to share with us for one minute. Any thoughts at the end or main outcome that you felt you're bringing with you after these days at our summit? So let me then start with Chris Kupala Krishnan. You also asked for the floor, so that was the timing. Yeah, see, I strongly believe that just one model is not sufficient given the size and the scale of the problem. We need to try out different models and different ways of doing things. Second is that in a democracy, government has an important role to play. Politicians and politics has an important role to play. We need to not look at it as versus them, but we need to look at it as, how can we all work together to make this happen? How can we build partnerships and collaboration? I think somebody talked about it. To make this happen, I believe in private sector, but I also believe that there is a role for civil society, there's a role for government, there's a role for academia, research, innovation. We need to work all together to make this happen. And what I feel is that there is an opportunity for India also to create new models in areas like sustainable consumption, sustainable development, et cetera, some of which got discussed in this forum, which I think we can contribute back to the world, because the disparity is one of the challenges with every country, every system is now faced with. Though Mondex thing talked about is coming from West, but I feel it has happened in every society. So we need to think about that also and see what we can do, because we are feeling it strongly in India also. Siddhartha? Yeah, I think, I mean, on the one hand, of course, business needs to shape up as well. I mean, it's not only about the government. I mean, I think today in India, it's like the Wild West in business, because everyone's just out there doing what they want. And also, I mean, I'm saying from a transparency and from a corruption point of view, they're two hands, they're two sides of the coin. So business has a very important role to play. Having said that, it's still an outstanding place to invest, India. So countries, companies such as Nestle, who've been here for so long, and people who make meaningful long-term investments, today, they are the ones who are gonna prosper 10, 20, 30 years from now when India totally flourishes. So there is enormous opportunity as it stands today. But if I were to say that what is the one big thing that I took out after these two days of a really good multi-stakeholder event, which is what it truly was, was the issue about transparency. And I think it was great to have Mr. Vinod Rai here, who actually spoke about it very eloquently and was, and I think the point which came out was that transparency will really foster meritocracy. Whether it's in politics or in business or in civil society, it fosters meritocracy. And it liberates the force of true entrepreneurship in India. And that is the strength of India, entrepreneurship. And if you can liberate that force of entrepreneurship, everything will be set right in my opinion. So really that's my two bits from the last couple of days. Thank you. So then we have Shasmin Vidprath. In a word, collaboration, I think collaborative partnerships are gonna be absolutely important going forward. I was kind of surprised at how the level of kind of mutual suspicion between business and civil society in particular here in India is stronger than I've seen in other parts of the world. And I think that these kind of fora that provide opportunities for discussion, honest debate can only help. And I'm certainly going away with lots of opportunities for collaboration between my organization and business. And I just hope that there's more of those and that we can work together on a larger scale at the macro level as well in order to tackle some of these issues that we all care about. Thank you so much. Achali Javat. I think this forum has been really great for me. One for providing the platform to a Sarpanch, the elected head of a village council, which usually does not happen. And I'm glad as we just heard, it's important that people from the different sectors of the society come together and try and work together towards improving the nation and of course get support from outside as well as where it can come through. So I think it's really great and I really love the fact that we are discussing different aspects of development from economic to softer issues of women and children, et cetera. Because if you're looking at development, it has to be a holistic development. It has to be holistic in the sense of different sectors, be it the urban sector or the rural sector. It's only then can we actually develop and improve in a big way. What I would like to appeal is, given the fact that there's so much technology, there's so many innovations that are going on, I plead to all of you to come forward and help us in rural India because I think technology is one of the biggest ways of bridging the gap that exists, be it in terms of education, be it in terms of providing livelihoods, improving them through vocational training, et cetera. Because of course the costs involved, as we know, and also the willingness of people to go to villages, unfortunately, is not enough. And that's what I think technology can play a huge role. And I'm certain, in fact, I've already met some people and I've really appreciated the warmth and the appreciation they've shown towards me and my work. And some of them have even tried to understand what kind of issues exist at the grass root level in the villages. And it's been really motivating and touching for me to see that there are people out here who've shown willingness to come forward and I'd like to invite all of you to come to my village and see how much development we've been able to do and what all is there. There's so much more to do, not just in my village, but I think with all your support, villages across the country can get the support and improve in a big way. And I'd like to thank all of you for the appreciation you have shown towards me and my work. Thanks again. Thank you. Paul Wilke? Very fast. Yesterday on a panel, it was about reboot India. I don't believe we have to... It was a very lively discussion. I remember that. Most of the discussions there are very... It was a very... No, I must say, I learned a lot about India in that panel. And maybe some reason why sometimes it goes a little bit slower than it should. The title is Deliberation, Transformation from Words. We had the words there, we have to go to action. But anyhow, I do believe, as I said, India, it feels like if you listen in here, India's on the crossroads, it's always interesting. And I do believe they have taken decisions that are quite inspirational. These are good platforms to work on. But I would really invite them to be consistent and have the higher purpose of this country really dictating that purpose rather than infighting and all that. They sold the negative for the country per se. So I said also simplicity. Simple things are normally better understood by the broader public. And so simplicity and consistency and the potential of this country is just amazing. Montek Singh Alohwale, you know, listened to the main takeaways from these two days from our distinguished co-chairs. And as I mentioned also in the introduction to you, you've been a very central person behind the reforms in India in the 90s, but also the reforms that are being undertaken now. You're in charge together with the Prime Minister for the five years plan and also spend considerable time of your life at IMF. But looking at India in a broader global context, India has achieved a lot, but looking at the decade to come and you're now embarking on a new five years plan and then there will be a new one probably after that one. Where do you realistically see India in 10 years and where are your aspirations for India? Well, look, you know, if you just look at conventional measures, GDP and so forth, the most that you can do in 10 years is actually to double per capita GDP. I mean, you need to grow at about 7% per capita to double per capita GDP. So that's not going to make us a very rich country in terms of per capita income. But I think if it's an inclusive growth and if we address some of the issues that have been raised by various participants, which are very much on the agenda, I can assure you that no government in India can be conducting or designing policy, not aware of the need to do the inclusion to take care of the obvious deficiencies on the social side, make sure that the rural sector improves, et cetera. I think over 10 years, we could make a very substantial difference in many of these indicators. So, you know, the level of poverty 10 years from now will be quite different. We never eliminated, but it will be much lower than what it is now. And the important thing then is, you know, that like 30 years ago or yeah, 30 years ago, you would have had 70% of the people below the poverty line. And 10 years from now, it may be only down to less than 20%. That alters the sort of perspectives of people, what kind of aspirations people have, you younger population. I think that's gonna bring about huge changes that you really can't plan for, but you should keep your mind open on because I do agree, new ways of doing things, innovation. And in India, that's unavoidable. I mean, it's impossible, and I'm glad it's impossible, to plan from top down. So I think we're gonna have lots of experimentation and my guess is that, you know, since in all these critical areas, they really lie in the hands of state governments. States are actually competing against each other. I'm pretty sure that most, I hope, will do extremely well. I hope that all of them do well. In due course, all of them will do well. Thank you. I think that merits applause. I would like, of course, on behalf of all the participants to thank, especially, of course, Montexing Alovalia, that you spent your precious time with us here this afternoon. But I also would like, of course, to then convey a heartfelt thank to our distinguished coaches that've been with us and shown their leadership for two days. I would also like to thank all our participants. And I hope that you have had a rewarding day here. I think we've all seen that it is India that is, again, undertaking important reforms. It is India that is not looking and being satisfied and complacent with the economic growth of 5.5%, but looking at how to get back to 7, 8%, and then also being able to deal with all the challenges in this country, but also all the opportunities and giving all the young people of this nation more than 50% under 25 years the opportunities that they are also longing for. I would also like to use this opportunity to thank my two very good colleagues, Sushant Parakarthi Rao, he's senior director for Asia. He's been one of the masterminds behind this and also my colleague Viraj Mehta, our India director. Very thankful for their effort. And I, again, thank you to all and this is the closing of the 28th World Economic Forum Summit on India. Thank you.


Good morning, Romani. I hope you're all having a great conference so far My name is Angela and I work for man HL, which is a systematic hedge fund based in London Where I'm a quant developer I'm really excited to be here today to tell you about how you can make a full stack application with Python npm webpack and react now being able to Transform an idea into an actual product is an incredibly valuable skill both for your career and for you as a person it can kind of take you from thinking of something and Making a minimal viable product that you can either use to start a startup make a new application at work and Get that promotion that you're looking for Because you can show that you can actually create things and make something happen So today I am going to be showing you how to make a simple web application like this this is a single-page web application When you click the button it changes With what it says by giving you hello in a different European language It has a background. It has some style, but it's not really doing anything very complicated So What does a web app look like this is an example of this web application Which I would say is in general quite a good representation of what a web application would look like It has a front end and it has a back end the front end is what you see here in blue and green and it consists of What the user sees and how the user interacts with the web application I'm going to explain this with the assumption that you have a basic understanding of what HTML CSS JavaScript and Python is And if you are a perfect expert in all of these things then this hook might be a little bit basic for you But bear with me. So the index of HTML page is what essentially creates a structure for your website Historically, this would be an entire skeleton of what your website looks like but because we are using react react Actually componentizes all the pieces of your website so all of these things actually live in react now instead of in HTML and We will essentially just be loading in our compressed JavaScript react files into our HTML file and that's literally what that file is going to be We then have these two light blue files at the top It is our style file and our JavaScript file. These have both been bundled By our extra extra tools. So if you look in these dark blue files They are our react files. We take our react files, which have been written in JSX they are passed into the Babel Converter Babel conversion to normal JavaScript web pack then converts this to something that Our browser can understand Because we're back only understands normal JavaScript and then we attach those things to our browser When we talking to the back end when we are Clicking that little button. What happens is that we are using a JavaScript library called jQuery Do you have HTTP request to ask the server? Hey, can I get a new type of hello, please and the server will return that to us and we will display it on our website So for this example, we are going to be using flask Which I'll get back to more later. So first things first This is going to be our initial project setup. You have a folder in your folder You will have a read me to tell other people about your project and what you're doing and you'll have a project folder respectively This product folder has a server folder and a static folder the static folder is our front end It holds your JavaScript your web pack your Babel your npm And we're going to start by going in there And building our front end so the first thing we are going to need is a JavaScript package manager and package manager, I'm sure you're all familiar with from using things like pip or apt-get And it really just manages your packages It makes life so much easier because you don't have to worry about Going through this website to download the new version of that package making sure you have all the right dependencies What are even my dependencies? By using a package manager, you just say oh, I want this file and this file and this file And it downloads the version you want or the latest version and you can easily see what's going on So we are going to be using npm Npm is automatically included with no.js if you still install that but it is really a separate application And you can use it with other languages and just no.js, but it is a JavaScript package manager It is very easy to use it has a lot of packages. It has about half a million packages It's well documented and it is actively being developed So it is essentially a safe option that isn't just going to be deprecated in two months At least I hope not So the first thing we're just going to do is initializing npm for our project This has really good defaults and you basically just follow the defaults and this creates a package of JSON file The package.json file ends up in our static directory like you can see here in pink So for reference everything that's pink is the things that have changed The package.json is really useful for multiple reasons It is just a file. You can look at it and it tells you who is responsible for the project What version is the project? How do I contact the developers? What keywords are relevant to this project? And it also means that any other developers can very easily Install and run your project and it should be completely reproducible So this is what my package.json looks like As you can see there's a name. There is a version There's dependencies and a license so everything I really need to know about how this front-end works The next thing we're going to need is a module bundler This minimizes the number of script tags in your JavaScript So if you've done a bit of JavaScript before you know that once you start kind of having quite a few JavaScript files You need to add them all to your HTML.index or similar And you need to add them in the right order because if you add them in the wrong order then Everything is a global and depending on you know, how you do this it gets quite messy and it takes a long time to load so By using webpack this bundles our dependencies you essentially give it an entry point and based on this entry point It creates a dependency tree of all your dependencies And then you attach this bundled JavaScript file to your HTML. That is one script tag for one entry point And this basically means that you no longer have to worry about globals You no longer have to worry about which order do I import things in you no longer have to worry about Having loads of script tags and having really unreadable code. It's easy to see what's attached and how do I run it It also does lazy module loading which means that It's actually essentially your pages are going to be loading faster Right, so this is what webpack looks like with its Mode basically it's bundling so it takes all your normal modules and turns them into static modules One important thing to note about note about webpack is it only understands JavaScript This means that anything else Needs to be converted into JavaScript to be used. This is both a benefit and a bit of a problem This means that we need to add a loader or a plug-in for everything else You want to add this means you want to add CSS. There's a loader for that. Do you want to add files? There's a loader for that you want to have a background image. There's a loader for that obviously, there is a little bit of a Learning curve here, but once you kind of start getting the hang of it. It's actually quite okay But the benefit of everything being a module is that you can attach it and require it inside your JavaScript So I can require my CSS file in my JavaScript and I can require my background image in my JavaScript Which is actually what quite really quite powerful And it also integrates seamlessly with npm so this is how we get started with bell pack You install it using npm And then you add a file called webpack.js It really just has In the least Everything you need to get started is an entry point and the output And the entry point is just going to be our JavaScript directory and the index file in there And then our output is just going to be a bundle.js And then we export this and it ends up here in our static folder And we can really get ready to use that now if you want to have a if you have an application that is a multi-page application Instead of the single-page application. We are using this is how you would do it So you can have multiple different entry points for your different sites You can have an index page and about site and they will all have a different entry point Creating a different bundle so in this case you can look at what happens in the output Where we have the bracket name.js and this would just be named after your entry point name Okay, so let's actually do something interesting with this. We're going to start by displaying an alert This is going to be our updated directory tree. We're just adding an index of hml file and a JavaScript file And then you can also see where our bundle ends up that So okay the index This is super easy as I mentioned previously. You literally just add your Bundle to your the body of your file and that's it everything you need to do All the layout and behavior is in react In our index.jsx file all we're going to do is add an alert. This is literally the only file Only sentence effectively that is in our file And that's enough to Create an alert We don't need to build our application as well I always add some run commands when I build my application a run command is just an alias For example, if you add a watch command As you can see I can just then use watch as the word instead of that remembering that entire line and all the parameters And it just makes your development process a lot more fluid It means that you don't have to remember the giant lines and you can kind of just do a build and it just builds It's similar to using a make file So when you start the watch command Watch is special in the sense that you start in a different tab and you just keep it running It automatically builds any change files and re-create a new bundle for you. So you don't need to worry about actually Making sure that you've compiled your code manually because watch is going to do that for you That means you can refresh your browser window and see your changes immediately Instead of sitting there going okay, I made some changes, but they're not displaying and Five minutes later you realize because you forgot to build We open the index of HTML page. Ta-da. We have an alert great. Okay. Let's do something more interesting We're going to add React to this Now why am I using react? I really like react because it allows you to build small componentize UIs with reusable components It makes it really easy to basically do repetitive things without having to write The same code over and over and over again, which is very good computer science Methodology in general It's easy to maintain and it's easy to re-render components and change All the logic for a component lives within that component which makes it very easy to Basically see what's going on see what lives where and switch out one component for another one without problem so we're going to install react and Then we are going to add a react file Which is basically replacing that alert we had previously with this text. So for react you always need to import react To be able to use react Obviously There's a few things to note here. The react dom means that we are essentially displaying things in With react As you can see when I'm importing my app, there's a dot slash in front of it This means I'm importing it from a local file that I've created instead of external dependency and You might think that being able to use brackets is kind of weird inside my JavaScript code But this is essentially what JSX does it allows you to use custom effectively html tags with your own created classes So the app here is effectively our entry point into this part of our react code our application We are then going to add the app class, which is something that actually does something In this case, we are going to just have it display hello react And we need to export default on this class So you always need to be able to you always need to export your classes to be able to import them somewhere else And it's good to practice to only have one class per file and which which means that we can basically just export defaults This is where our new file ends up in the JavaScript directory next to the index file now what is JSX it's exactly a Syntax extension to JavaScript. It means that you can use XML and HTML tags in your JavaScript code and you can use your custom classes directly in your JavaScript code So it lets you write those HTML tags you see there instead of react dot create element blah blah blah, which makes your code a lot more readable But how do we make our browser understand? JSX, okay, so for this we need to use Babel Babel is fantastic. It converts your You know top state-of-the-art Really modern JavaScript into JavaScript that any browser can understand. So it allows you to use JavaScript And allows you to use JavaScript That is modern without having to wait three years for your browser to start eventually being compatible with it It also allows you to use JSX because it converts JSX into standard old JavaScript So to be able to use Babel we need to add presets and Babel has preset It basically means what types of JavaScript do you want me to understand and convert between so We're gonna add ES 2015 and we're going to add react which basically means these are the currently the two types we can use We then need to go to our webpack config and also add a rule for how we're going to treat JSX files Note for this that we are excluding node modules node modules is the directory where all your external dependencies end up This basically means that when we're not compiling this we are going to save a lot of time every time We're rebuilding our bundle because we're not interested in retranslating this every time We are going to open the index of HTML page in a browser and they should say hello react which it does We then need to add a Python flask server You need to go to the server folder and ensure you are in a first Python virtual environment You then need to basically install flask because we are going to be using flask So I'm Produce flask for a project like this because it's a micro survey or a micro framework It's really easy to use and get started with if I was doing a big industry project I would probably be using something like pyramid or Django instead, but it really depends on what you need to use it for And we're just adding a file called server dot pi to our server folder in here setting up flask is very easy So You just need to point at where your static bundle is and where your index of HTML is And then you need to So we have two two routes to our server We have the default route that you get to when you just go to the server and then you have the route you get to When you go to slash hello We are going to be using the Default route to just load our website and then we're going to be using the slash hello end point to get all those different Hello's that you saw in the beginning For now, it's just going to return a static hello world We can start our server and go to local hoist 5000 and you will see that hello react We saw previously Because then it's basically connected your react and your Python back end now This is great, but how do we actually make react communicate with that back end? We need to use jQuery or Whatever other library of your preference, but I quite like using jQuery. So with jQuery We basically just Call the URL in question, which is our local host URL with slash hello And then we get some data back and with that data We are going to display it in our console to check that it works And we are also going to be passing it to a different function to handle that data So this function you see here. We are going to be adding to our react code We are then going to be changing the Python in the back end to do something a little bit more interesting So instead of just returning that static hello world We are going to be returning a series of different European. Hello's Notice that there is no English hello because then we would have to update our code in about a year to remove it anyway So yeah, and we just return a random word from that list And I think it's nice to be able to say hello to someone special instead of saying just a generic hello So we are actually going to be making a few changes to our react code here We are going to be using a class instead of just putting all our code in in our app file Because that means that we could technically have ten things Saying hello to someone on our web on our front page instead of just one But for the sake of this we'll just do one So you might recognize this as the render function from previously in our app to JSX file I've made it a bit more interesting by adding a page header, which is where all our information is going to go and Also, we have this class now called. Hello Which is passing in a name called remedy what we want to do is we want to create a class called hello to JSX And we want to pass in a parameter to it. That is the name. We want to say hello to Okay, so how do we do that? To do that you need to add a hello to JSX file naturally Then you need to create the hello class as Previously you need to export default on the class to make sure it's accessible outside And you need to have a constructor the constructor passes in this thing called props The props here is essentially everything you've passed in on creation of the class Props are immutable and you're not allowed to change them We then therefore need to also have a state States are internal you can change them and when changing state That's generally when data is actually updated on your website So when we click that button and you see a different type of hello That is because we've changed the state and on updating of the state your UI gets re-rendered But we never touch the props So as you can see here, we are initiating the state with a greeting key And it just says hello and the name we pass in which is Riemeny. So hello Riemeny Also note that we have to rebind this This is because this is not bound by default So when we are trying to call a function when we click a button if we don't rebind this on that function We're just going to get undefined if we're trying to use this within the function and this is just a JavaScript thing It's not really a reacting as such But it's important to keep in mind So we are going to be adding this function to our hello class and this is the function that handles the data we passed in So we get a new type of flow from our server We pass it to this function as data and then we revender the state When you revender the state you always have to use this dot set state with your key Because if you try to do what we just did in the constructor, it's not actually going to revender the UI So that's why you always have to use this sort of set state So okay, let's render that hello We wanted to be output as a big hello a little bit of a line and then a button that you can click to change Your hello to do this I'm added on each one with our actual reading an HR in the middle and then a button that goes say hello whenever you click hello And I've used the bootstrap buttons for this because they come by default with quite a nice UI without you having to do anything And they are very accurate version that you can just import that already has those are this functionality. So what do we get now? We get a UI that says hello remedy and a button great, okay, so How do we go from this to something a little bit more interesting I Want to add some CSS? And as previously JavaScript only or webpack only understands JavaScript So I need to add a loader And I'm going to install the style loader the CSS loader And an extract plug-in We need these two loaders to convert our CSS files and then we need the extract plug-in to be able to extract our bundled CSS from our generic JavaScript bundle into something we can actually attach directly To our index of HTML file so we can render our JavaScript and our CSS separately if you don't extract it and attach it separately You're basically gonna have your UI probably be rendered after all your JavaScript has gotten been rendered which is gonna have very weird side effects So we need to add a plug-in which is the extract plug-in and the name in pink You can see there is what we've decided to name our bundled CSS file And that is what it's gonna look like in our directory tree note that there is a difference between my CSS file full stack dot CSS and My bundled file styled CSS and this is because our browser only has access to the bundled files If you try to load up the normal CSS file, you're not really going to get the result you expect It's just not going to apply your styles. So you need to attach the bundle one and Basically load that up So how we do that is Adding a full stack dot CSS to our folder I'm out of the few styles to it. Just something to make you look a bit nicer And then I need to require My full stacks of CSS file in my react code if you don't load it into your react code It's not going to be picked up when webpack is bundling and it's going to think you have no styles applied And as a result, it's not actually going to get compiled And then we need to add the style sheet, which is the bundle style sheets To our index of HTML page and what we end up with then is this And now you can see our style has been applied It looks different and it's quite nice, but I would still like to basically add a background image Adding a background image It's just adding an image or image folder We need to then use a file loader to load that image When you use a file loader, you can specify what types of files you want it to load So in our case, we are going to specify that we will load JPEGs PNGs, etc. And that is just another rule in your webpack config And then you need to Basically add a background URL to your CSS as we've done here But the caveat here is just adding this to your CSS is not going to actually make your image show up You need to also load your image in your React code to be able to have that image show up And this is something that a lot of people seem to be quite confused about Just judging by googling it Because basically you need to import your image You then need to create a new image object And add your image as the source for that new image object And then you need to render your image In your render function in that file And only if you do all of those steps are your images actually going to show up Otherwise, you're not going to see anything. You're going to see that white page we saw previously So what we have now is An app that has a background image It has some nice CSS We have managed to position it Where we wanted to on the page and when you click the button It says hello in different european languages So thank you for listening and any questions You can find me on engineering and twitter This is also the same handle I use on GitHub and medium And there is a blog post about how you can do this step by step And all the code is also on github So you can either follow the blog post and do this step by step Or you can go to github and just get all the code immediately The slides are also been uploaded on the european website, of course Thank you Any questions? Yes Hi, thank you for your talk Is there a reason you don't use yarn in place of npm? No particular reason It's um, I really like using npm. I've been using it for a while. It is really good support It works really well I've never had an issue with using it. No compatibility issues Um, and it basically does what I need. So I've seen no reason to switch at presence Any other questions? Have you got any suggestion about a trade-off between the server side code and the client side code because sometimes Of course the Rendering the page client side gives you benefits in terms of speed, but of course Many times your device is not Is not powerful enough to to render your your page. So maybe you have some Uh trade-offs that uh for some uh suggestion that you want to share and uh or maybe I don't know. You have some tips and tricks about that. Yes, so technically you can react render react server side as well but I would say in general, uh, it's Quite good practice to just try to minimize the sizes of your web pages Use lazy loading try to split up what you're doing on different pages To not try to load You know a multi megabyte image immediately with all your functions and try to do 10 different calls So kind of try to optimize your page in that way and also you obviously want to put all your application logic In your back end to any longer running applications any Complex computations anything like that. I would always put in my back end and just leave the front end as Rendering the nice things anything I can kind of do asynchronously in the back end. It's perfect basically Um, so yeah, any other questions? Okay. Thank you for listening